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

Hi. I am trying to use your zotero2readwise, but I am having problems. It does not run #83

Open
jechavso opened this issue Jan 3, 2025 · 2 comments

Comments

@jechavso
Copy link

jechavso commented Jan 3, 2025

I will love to use zotero and readwise together but so far, no success.

This is what chatgpt reports when I run python

The itemType={item_type} in your code seems to be passing item_type as a Python dictionary or string literal (e.g., {'annotation'}).
However, Zotero expects a plain string for the itemType, like itemType=annotation.

Earlier on I found issues with the file zt2rw.py

Thanks

@jechavso
Copy link
Author

jechavso commented Jan 3, 2025

my email is jechavso@gmail.com

@johnnydtan
Copy link

I had the same issue. I was able to fix it by simply removing the braces { and } from the line below, which I believe is causing it to be sent as a string literal, rather than a string. But I'm not entirely sure if this is the proper fix, so I won't submit a patch, especially given this code has been in since the beginning, and it's worked for many people up until now. It's not clear what has changed recently, and whether that change is on Zotero's API side or with this python script.

But this should get you going for now until someone figures out the "real fix".

$ diff ~/zotero_venv/lib64/python3.11/site-packages/zotero2readwise/zt2rw.py*
82c82
<         query = self.zotero_client.items(itemType=item_type, since=since)
---
>         query = self.zotero_client.items(itemType={item_type}, since=since)

afstarke added a commit to afstarke/Zotero2Readwise that referenced this issue Feb 4, 2025
remove { } as advised by [this fix](e-alizadeh#83 (comment))
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