Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When manually running the demo (sequence) via the web-api, the contest uid's are messed up. #96

Open
windoverwater opened this issue Apr 30, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@windoverwater
Copy link
Collaborator

Describe the bug
When manually executing what could be a demo sequence with the web-api, the backend raises this error:

File "/Users/sandy/Library/CloudStorage/Dropbox/repos/VTP-dev-env/VTP-web-api/src/vtp/web/api/./main.py", line 39, in get_empty_ballot
empty_ballot = VtpBackend.get_empty_ballot(vote_store_id)
File "/Users/sandy/Library/CloudStorage/Dropbox/repos/VTP-dev-env/VTP-web-api/src/vtp/web/api/./backend.py", line 106, in get_empty_ballot
return operation.run(
File "/Users/sandy/Library/CloudStorage/Dropbox/repos/VTP-dev-env/src/vtp/ops/cast_ballot_operation.py", line 270, in run
a_ballot.read_a_blank_ballot(an_address, the_election_config)
File "/Users/sandy/Library/CloudStorage/Dropbox/repos/VTP-dev-env/src/vtp/core/ballot.py", line 580, in read_a_blank_ballot
with open(ballot_file, "r", encoding="utf8") as file:
FileNotFoundError: [Errno 2] No such file or directory: '/opt/VoteTrackerPlus/demo.01/guid-client-store/e3/f7da09fe5ce1dc19f210e587b425f7ae116727/VTP-mock-election.US.14/GGOs/states/Massachusetts/GGOs/towns/Concord/blank-ballots/json/004,005,006,007,ballot.json'

To Reproduce
Steps to reproduce the behavior:

  1. Initialize /opt/VoteTrackerPlus/demo.01 from scratch
  2. Start the web server:
    • % uvicorn main:app
  3. Create a few guid workspaces
  4. Try to get a blank ballot via

Expected behavior

A blank ballot is produced. Note that the blank ballot uid name should be 0000,0001,0002,0003,ballot.json. This implies that the new caching scheme or something else is broken

Additional context

Need to understand how async FastAPI endpoints are actually working thread wise first.

@windoverwater windoverwater added the bug Something isn't working label Apr 30, 2023
@windoverwater
Copy link
Collaborator Author

Note - on 2023/05/04 I tried to reproduce this and could not.

@windoverwater windoverwater self-assigned this May 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant