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

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

Closed
embelardo opened this issue Jun 12, 2019 · 2 comments

Comments

@embelardo
Copy link

General

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

Problem description

  • What were you trying to do? Trying to upload .txt and .xml files
    • What API call did it involve: zotero.attachment_simple()
    • What error was raised? AttributeError: 'Response' object has no attribute 'get'

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 <module>
    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
Copy link
Owner

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

@embelardo
Copy link
Author

Thank you very much!

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