Closed stakats closed 11 years ago
I copied the wrong output URL, but the situation is the same: https://api.zotero.org/users/3/items/top?content=json&start=50
I wasn't getting a 403, but it was still falling over, due to an unrelated bug. Can you try again using the dev
branch?
Tried again with the dev branch and still encountered a 403.
I can't reproduce this, running v0.9.7 (the latest version on PyPI). I just tried again, and retrieved all 606 items in my library.
Are you running Python 2.7?
Yes, running 0.9.7 with Python 2.7.1. The problem seems to be that when everything() gets to items.extend(self.follow()), it's just chasing down link rel="next" which in my case is https://api.zotero.org/users/3/items/top?content=json&start=50. Since no API key is appended in the next links, it fails.
I've done some more testing, omitting my API key, and the top()
call still works, even though I should be getting an immediate 403. I'll post to zotero-dev before doing anything else, but unless I'm missing something obvious, there are two issues here:
top()
calls to fail (correctly, as it turns out), which should be an easy fixEasily solved: 1) there's a bug in pyzotero; 2) your library is public. If you test with a private library, you'll find the bug.
Hah. That explains everything.
OK, commit c8fab2c360451e53935c42c327a1654dd3f167f5 on the dev branch should fix this.
zot.top() functions fine, but zot.everything(zot.top()) generates a 403 using a private individual library. Is it possible that the API key is being dropped in the everything call? In my script output I see URL: https://api.zotero.org/users//items/top?limit=5&content=json&start=5 with no key appended.