neurocurator
neurocurator copied to clipboard
[References] Editing a Zotero reference without 'firstName' and 'lastName' for 'creators' makes NeuroCurator crashes
Steps:
- Click on a reference using 'name' instead of 'firstName' and 'lastName' for 'creators'.
- Click on 'Cancel' if the 'This paper is not already in the curator database' dialog appears.
- Click on 'Zotero' in the menu bar.
- Click on its item 'Edit reference'.
- NeuroCurator crashes with the following stack trace.
The only reference causing this issue is the one with the DOI 10.1113/JP274049, as of 20.08.18.
This issue is related to the discovery made in https://github.com/BlueBrain/nat/issues/17.
Stack trace:
Traceback (most recent call last):
File "/Users/fonta/repos/neurocurator/neurocurator/zotero_widget.py", line 148, in edit_reference
dialog.load_reference_data(reference["data"])
File "/Users/fonta/repos/neurocurator/neurocurator/zotero_edition.py", line 84, in load_reference_data
widget.load_creators(ref_data[self.CREATORS_FIELD])
File "/Users/fonta/repos/neurocurator/neurocurator/zotero_edition.py", line 220, in load_creators
cell_value = creator[self.HEADERS[j]]
KeyError: 'firstName'