Open mwegnr opened 2 months ago
Could you try again using v1.5.24?
Works as expected with v1.5.24
sha256sum zotero-unprocessed-min*
f0ff0dc6df7906bb3bfcd32606fd6b2b0f7ebce18d1f3626109e146676ac286f zotero-unprocessed-min.pyzotero.de-DE.json
6df7f88aa966ad47c1cb43e33d87d60f0bdf5ac0f6ead382141cc558513a84af zotero-unprocessed-min.pyzotero.en-US.json
f0ff0dc6df7906bb3bfcd32606fd6b2b0f7ebce18d1f3626109e146676ac286f zotero-unprocessed-min.requests.de-DE.json
6df7f88aa966ad47c1cb43e33d87d60f0bdf5ac0f6ead382141cc558513a84af zotero-unprocessed-min.requests.en-US.json
Thank you for the really quick fix!
I encountered an error with the added locale when combining the top()
with everything()
. I was using v1.5.25.
It seems, that at the second top()
call in everything()
, the locale is added again, which leads to this invalid request URL after the first 100 items have been obtained:
URL: https://api.zotero.org/groups/4533881/items/top?include=bib%2Cbibtex%2Ccsljson%2Cdata&limit=100&linkwrap=1&locale=de-DE&start=100&locale=de-DE
Can you install master
and try now? The new solution is a bit more robust about adding the locale if it already exists but I want to make sure it works before I push a new release.
I do not get an error anymore using top()
in everything()
, but the locale seems to get ignored again (en-US and de-DE-JSON have same hash) using the code from the original report.
I also noticed that the JSON using pyzotero is missing the bib
,bibtex
and csljson
fields, which were added as a parameter. Therefore the hash is different from the JSON file generated using requests
.
sha256sum zotero-unprocessed*
cf775c6bf78158d780d91665e9cc55a1089795f61ba1ba0dfc67f566380b15db zotero-unprocessed-min.pyzotero.de-DE.json
cf775c6bf78158d780d91665e9cc55a1089795f61ba1ba0dfc67f566380b15db zotero-unprocessed-min.pyzotero.en-US.json
f0ff0dc6df7906bb3bfcd32606fd6b2b0f7ebce18d1f3626109e146676ac286f zotero-unprocessed-min.requests.de-DE.json
6df7f88aa966ad47c1cb43e33d87d60f0bdf5ac0f6ead382141cc558513a84af zotero-unprocessed-min.requests.en-US.json
pip list
Package Version
------------------ --------------------
bibtexparser 1.4.1
certifi 2024.8.30
charset-normalizer 3.3.2
feedparser 6.0.11
idna 3.10
pip 24.2
pyparsing 3.1.4
pytz 2024.2
pyzotero 1.5.26.dev4+g12896b5
requests 2.32.3
sgmllib3k 1.0.0
urllib3 2.2.3
Also, this is my complete code generating the complete JSON files. Feel free to use it for testing
Platform: Arch Linux (also happens in dockered Debian) Python version: 3.12.5 Pyzotero version: 1.5.20
Problem Description
What were you trying to do? For our project, we refresh a json containing our zotero library every night for different locales (en-US, de-DE). The resulting files seem to be identical. However, if fetched directly from the API using request, they are different.
What API call did it involve? top items (see code example below)
What error was raised? no direct error
More Details
Our group library is public, using the following code it should be possible to reproduce the error.
Minimal code example:
Hashes of obtained files: