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

Login stops working if user logs out immediately after the pre-annotation questionnaire #68

Open
aleksandra-miletic opened this issue Sep 28, 2023 · 2 comments

Comments

@aleksandra-miletic
Copy link

Hi,

I'm using potato for an annotation project which has a pre-study questionnaire. Multiple users have reported that their login stops working if they log out immediately after completing the questionnaire (and before completing the annotation task on the first annotation page). The next time they try to log in they get an Internal Server Error, and in the logs I find this:

INFO:potato.flask_server:Loaded 0 annotations for known user "XYZ"
ERROR:potato.flask_server:Exception on /login [POST]
Traceback (most recent call last):
File "/home/ubuntu/flaskenv/lib/python3.10/site-packages/flask/app.py", line 2190, in wsgi_app
response = self.full_dispatch_request()
File "/home/ubuntu/flaskenv/lib/python3.10/site-packages/flask/app.py", line 1486, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/ubuntu/flaskenv/lib/python3.10/site-packages/flask/app.py", line 1484, in full_dispatch_request
rv = self.dispatch_request()
File "/home/ubuntu/flaskenv/lib/python3.10/site-packages/flask/app.py", line 1469, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
File "/home/ubuntu/flaskenv/lib/python3.10/site-packages/potato/flask_server.py", line 1112, in login
return annotate_page(username)
File "/home/ubuntu/flaskenv/lib/python3.10/site-packages/potato/flask_server.py", line 2120, in annotate_page
if (input_field.name != "textarea") and (input_field["value"] != value):
File "/home/ubuntu/flaskenv/lib/python3.10/site-packages/bs4/element.py", line 1573, in getitem
return self.attrs[key]
KeyError: 'value'

Do you have an idea why this is happening and what I can do to solve it?
Any help is appreciated!

Thanks,
Aleksandra

@Jiaxin-Pei
Copy link
Collaborator

Hi @aleksandra-miletic, which version of potato-annotation are you using?

This seems to be an issue fixed with version 1.2.0.30

@aleksandra-miletic
Copy link
Author

Hi @Jiaxin-Pei,
This does seem to be a version issue, since I'm using 1.2.0.25. I'll update to 1.2.0.30.

Thanks for the quick reply!
Best,
Aleksandra

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants