Closed xwzliang closed 4 years ago
Platform: macOS Mojave Python version: 3.7 Pyzotero version: 1.4.14
Using create_items to create a linked_url or linked_file attachment item will cause AttributeError.
Code: linked_url_template = zot.item_template('attachment', 'linked_url') linked_url_template['title'] = "Amazon.com Link" linked_url_template['url'] = linked_url resp = zot.create_items([linked_url_template], item_key)
Traceback: File "/usr/local/lib/python3.7/site-packages/pyzotero/zotero.py", line 1292, in create_items backoff = presp.get("backoff") AttributeError: 'Response' object has no attribute 'get'
Argh. Fixed and released to PyPI. Sorry!
Thanks!
General
Platform: macOS Mojave Python version: 3.7 Pyzotero version: 1.4.14
Problem description
Using create_items to create a linked_url or linked_file attachment item will cause AttributeError.
Code: linked_url_template = zot.item_template('attachment', 'linked_url') linked_url_template['title'] = "Amazon.com Link" linked_url_template['url'] = linked_url resp = zot.create_items([linked_url_template], item_key)
Traceback: File "/usr/local/lib/python3.7/site-packages/pyzotero/zotero.py", line 1292, in create_items
backoff = presp.get("backoff")
AttributeError: 'Response' object has no attribute 'get'