Comments (1)
This also happens with a unique constraint on audit board ids, which is easier to fix on the front end by using uuidv4()
instead of audit-board-${i + 1}
.
But on the sample size endpoint we are also getting a failure due to a unique constraint on batch.id
, which isn't getting passed from the front end:
ERROR in app: Exception on /election/ebc3166e-a645-44c9-bbbf-4557b08e840a/audit/sample-size [POST]
Traceback (most recent call last):
File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/flask/app.py", line 2311, in wsgi_app
response = self.full_dispatch_request()
File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/flask/app.py", line 1834, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/flask/app.py", line 1737, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/flask/_compat.py", line 36, in reraise
raise value
File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/flask/app.py", line 1832, in full_dispatch_request
rv = self.dispatch_request()
File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/flask/app.py", line 1818, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/Users/morgan/Desktop/votingworks/arlo/app.py", line 312, in samplesize_set
election = get_election(election_id)
File "/Users/morgan/Desktop/votingworks/arlo/app.py", line 44, in get_election
return Election.query.filter_by(id = (election_id or '1')).one()
File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3282, in one
ret = self.one_or_none()
File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3251, in one_or_none
ret = list(self)
File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3324, in __iter__
return self._execute_and_instances(context)
File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3346, in _execute_and_instances
querycontext, self._connection_from_session, close_with_result=True
File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3361, in _get_bind_args
mapper=self._bind_mapper(), clause=querycontext.statement, **kw
File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/sqlalchemy/orm/query.py", line 3339, in _connection_from_session
conn = self.session.connection(**kw)
File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 1124, in connection
execution_options=execution_options,
File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 1130, in _connection_for_bind
engine, execution_options
File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 408, in _connection_for_bind
self._assert_active()
File "/Users/morgan/.local/share/virtualenvs/arlo-cgZpGxiy/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 295, in _assert_active
code="7s2a",
sqlalchemy.exc.InvalidRequestError: This Session's transaction has been rolled back due to a previous exception during flush. To begin a new transaction with this Session, first issue Session.rollback(). Original exception was: (sqlite3.IntegrityError) UNIQUE constraint failed: batch.id
[SQL: INSERT INTO batch (id, jurisdiction_id, name, num_ballots, storage_location, tabulator) VALUES (?, ?, ?, ?, ?, ?)]
[parameters: (('1', 'be63d6ff-3333-4557-8578-9666ab27b413', '1', 117, None, None), ('2', 'be63d6ff-3333-4557-8578-9666ab27b413', '2', 269, None, None), ('3', 'be63d6ff-3333-4557-8578-9666ab27b413', '3', 178, None, None), ('4', 'be63d6ff-3333-4557-8578-9666ab27b413', '4', 213, None, None), ('5', 'be63d6ff-3333-4557-8578-9666ab27b413', '5', 234, None, None), ('6', 'be63d6ff-3333-4557-8578-9666ab27b413', '6', 253, None, None), ('7', 'be63d6ff-3333-4557-8578-9666ab27b413', '7', 120, None, None), ('8', 'be63d6ff-3333-4557-8578-9666ab27b413', '8', 244, None, None), ('9', 'be63d6ff-3333-4557-8578-9666ab27b413', '9', 355, None, None), ('10', 'be63d6ff-3333-4557-8578-9666ab27b413', '10', 134, None, None))]
(Background on this error at: http://sqlalche.me/e/gkpj) (Background on this error at: http://sqlalche.me/e/7s2a)
127.0.0.1 - - [30/Aug/2019 14:14:14] "POST /election/ebc3166e-a645-44c9-bbbf-4557b08e840a/audit/sample-size HTTP/1.1" 500
I can't test further endpoints to see if they have similar issues until at least that one is fixed.
from arlo.
Related Issues (20)
- Revisit iconography of dialogs
- Disallow setting more audit boards than ballots
- Add support for uploading a standardized contest names and contest results for other audit types
- Manifest parsing check for a totals row generates false positives
- Activity log page needs an auto refresh
- Filling in any info for an opportunistic contest locks the user into setting up an opportunistic contest
- Selecting the state should come earlier in the setup process HOT 2
- Create a pre-launch phase the audit admin can use to check audit setup
- JM screen has a typo in batch comparison audits if no batches are selected
- Support user: create a "download audit report" button that's clickable at any point during the audit HOT 2
- Offline data entry with multiple contests should allow larger samples than drawn per-contest HOT 1
- Create a presentation mode for seed selection ceremony
- Audit planner: It would be nice to have a way to copy-paste in tabular election results
- Improve process for making alterations to participants file during the audit
- Improve CVR data validation for candidate names across jurisdictions
- Support a ballot type field for the manifests in all audits
- Support user: force the end of a round HOT 1
- Ballot-level audit labels: we should also include what number of audited ballots each ballot is on the label
- Support user for batch comparison: create an easy way to figure out how many ballots are sampled HOT 1
- Avoid division by zero error due to total number of ballots cast being 0
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arlo.