Skip to content

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

@windoverwater

Description

@windoverwater

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.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions