urschrei / pyzotero

Pyzotero: a Python client for the Zotero API
https://pyzotero.readthedocs.org
Other
908 stars 99 forks source link

attachment_simple(): AttributeError encountered trying to upload .txt and .xml files #99

Closed embelardo closed 5 years ago

embelardo commented 5 years ago

General

Platform: Centos 7 Python version: Python3.6 Pyzotero version: pyzotero v1.4.3

Problem description

If possible, paste the full traceback in a code block below, and fill in the summary

Traceback Traceback (most recent call last): File "./upload_zot_items.py", line 251, in main() File "./upload_zot_items.py", line 247, in main parse_jira_xml(args, target_collection_id) File "./upload_zot_items.py", line 214, in parse_jira_xml item_created = parse_jira_item(args, item_xml, target_collection_id) File "./upload_zot_items.py", line 196, in parse_jira_item upload_status = upload_file_attachments(item_id, dir_name) File "/vagrant/upload_zot_items_web_api.py", line 48, in upload_file_attachments ret = zotero.attachment_simple(item_files, item_id) File "/usr/lib64/python3.6/site-packages/pyzotero/zotero.py", line 1363, in attachment_simple return self._attachment(to_add, parentid) File "/usr/lib64/python3.6/site-packages/pyzotero/zotero.py", line 1028, in _attachment res = attachment.upload() File "/usr/lib64/python3.6/site-packages/pyzotero/zotero.py", line 2012, in upload self._create_prelim() File "/usr/lib64/python3.6/site-packages/pyzotero/zotero.py", line 1883, in _create_prelim backoff = req.get("backoff") AttributeError: 'Response' object has no attribute 'get'
urschrei commented 5 years ago

Sorry! Fixed in v1.4.4, released on PyPI.

embelardo commented 5 years ago

Thank you very much!