EdwardBetts / depicts

Wiki Art Depiction Explorer
https://art.wikidata.link/
GNU General Public License v3.0
4 stars 3 forks source link

AttributeError: can't set attribute http://localhost:8000/save/Q84714492 #18

Closed trnstlntk closed 4 years ago

trnstlntk commented 4 years ago

I get this type of error regularly (perhaps with one in 6-8 items I'm processing with the WADE tool); it occurs when trying to save one or more Depicts statements. Happens pretty randomly; I haven't been able to see patterns or what might trigger it. When reloading the item, I get the same error.

This specific error occurred when trying to add P180 -> Q9441 to Q84714492.

URL: http://localhost:8000/save/Q84714492

Traceback (most recent call last): File "/usr/lib/python3/dist-packages/flask/app.py", line 2446, in wsgi_app response = self.full_dispatch_request() File "/usr/lib/python3/dist-packages/flask/app.py", line 1951, in full_dispatch_request rv = self.handle_user_exception(e) File "/usr/lib/python3/dist-packages/flask/app.py", line 1820, in handle_user_exception reraise(exc_type, exc_value, tb) File "/usr/lib/python3/dist-packages/flask/_compat.py", line 39, in reraise raise value File "/usr/lib/python3/dist-packages/flask/app.py", line 1949, in full_dispatch_request rv = self.dispatch_request() File "/usr/lib/python3/dist-packages/flask/app.py", line 1935, in dispatch_request return self.view_functionsrule.endpoint File "/srv/depicts/app.py", line 138, in save artwork_item = Item(item_id=item_id, label=label, entity=artwork_entity) File "", line 4, in init

File "/usr/lib/python3/dist-packages/sqlalchemy/orm/state.py", line 441, in _initialize_instance manager.dispatch.init_failure(self, args, kwargs) File "/usr/lib/python3/dist-packages/sqlalchemy/util/langhelpers.py", line 68, in exit compat.reraise(exc_type, exc_value, exc_tb) File "/usr/lib/python3/dist-packages/sqlalchemy/util/compat.py", line 153, in reraise raise value File "/usr/lib/python3/dist-packages/sqlalchemy/orm/state.py", line 438, in _initialize_instance return manager.original_init(*mixed[1:], **kwargs) File "/usr/lib/python3/dist-packages/sqlalchemy/ext/declarative/base.py", line 842, in _declarative_constructor setattr(self, k, kwargs[k]) AttributeError: can't set attribute

EdwardBetts commented 4 years ago

Thanks for the bug report, this is now fixed.