-
Notifications
You must be signed in to change notification settings - Fork 98
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
Automatically upload or update pdfs in zotero with pyzotero #142
Comments
pdf name is the name you want the attachment to have in Zotero, like "my_pdf_10" and path must be the full file path: /foo/bar/baz.pdf In order to upload to a specific collection, you have to either attach to an existing item in that collection, or create an item in the collection and attach to that. |
Is this the right syntax?
This way the file appears in zotero, but the attachment is not found. |
I'm not sure what you mean by "file appears in Zotero, but the attachment is not found". The file is the attachment, and if you don't specify a parent ID, it will appear as a standalone file. What happens when you double-click it? |
When I double click it in the Zotero GUI under "My Library/Unfiled Items", I get the error message "File Not Found The attached file could not be found at the following path: /path/to/zotero/storage/ID/mypdf.pdf" The same happens with I'm not sure how to use the I have tried to upload another pdf with
Which is strange since the file is only 113 KB big, and I can upload it to zotero via the GUI. |
The parent ID is the id of an existing item. You can retrieve items in a number of ways (see docs). "id" is a field in the returned dict(s). Your entity too large error may be related to the total size of your Zotero library. If your storage quota is already full or nearly full, you won't be able to upload additional items. I can't reproduce the original errors – both attachment methods are working for me both with and without parent IDs using the latest Pyzotero version on macOS. |
Thanks for the info, I was able to add the attachment to an existing item with the id/key. You were right, after emptying the bin, the In the dict returned by My output looks like this:
|
No, the file path that's returned should match your local file path. But from your output above, the dict is in the wrong key: it's in |
Hi, thanks for the great package!
I'm looking for a way to automatically upload or update pdfs after I've compiled them in latex. Basically, I want to do the same than dragging a pdf file into a zotero collection in python.
Is this possible with pyzotero?
I have tried to upload a pdf with
zot.attachment_both([(pdf_name, pdf_path)])
but while the file appears in my zotero, the attachment is not where zotero can find it (File not found error). What is the correct way to do this?Also, how can I upload to a specific collection or subcollection?
The text was updated successfully, but these errors were encountered: