Giter Site home page Giter Site logo

everything() returns a 403 about pyzotero HOT 9 CLOSED

urschrei avatar urschrei commented on June 2, 2024
everything() returns a 403

from pyzotero.

Comments (9)

stakats avatar stakats commented on June 2, 2024

I copied the wrong output URL, but the situation is the same: https://api.zotero.org/users/3/items/top?content=json&start=50

from pyzotero.

urschrei avatar urschrei commented on June 2, 2024

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?

from pyzotero.

stakats avatar stakats commented on June 2, 2024

Tried again with the dev branch and still encountered a 403.

from pyzotero.

urschrei avatar urschrei commented on June 2, 2024

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?

from pyzotero.

stakats avatar stakats commented on June 2, 2024

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.

from pyzotero.

urschrei avatar urschrei commented on June 2, 2024

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:

  • a simple bug in Pyzotero, causing your subsequent top() calls to fail (correctly, as it turns out), which should be an easy fix
  • some as-yet-unknown problem with my library ID, which is causing API calls to be accepted, when they should be failing with a 403.

from pyzotero.

stakats avatar stakats commented on June 2, 2024

Easily 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.

from pyzotero.

urschrei avatar urschrei commented on June 2, 2024

Hah. That explains everything.

from pyzotero.

urschrei avatar urschrei commented on June 2, 2024

OK, commit c8fab2c on the dev branch should fix this.

from pyzotero.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.