Git Product home page Git Product logo

Comments (4)

osterman avatar osterman commented on May 28, 2024

I was able to export ~500 documents. It would stall every few minutes but then pick back up again - presumably after limits were exhausted. This was using the hosted version (quip-export.com).

from quip-export.

ibrahima avatar ibrahima commented on May 28, 2024

For what it's worth, I'm running this locally checked out from Git, and I noticed that it sometimes stalls for a while before continuing, and I assumed that was due to rate limiting. I haven't fully dug through the code, but it does seem to have some handling of rate limits.

It might be that you just need to change this line to also look for HTTP status 429?

---                if(res.status === 503) {
+++                if(res.status === 503 || res.status === 429) {

Hmm... it might be stalled because there's a per-hour limit of 750 requests... that seems unfortunate if you have more than ~700 documents.

https://quip.com/dev/automation/documentation/current#section/Rate-Limits/Per-user-Rate-Limits

It also seems like the Admin API might have fewer limits, but it may be a bit more complicated to get an admin API token than a personal API token (not sure if a personal API token automatically gets access to the admin API if the user is an admin).

from quip-export.

sonnenkern avatar sonnenkern commented on May 28, 2024

Hi ibrahima, thank you for using my tool.

It is very strange, I've tried to export from my Quip account without any issue. In the account I have about 86 folders, 213 threads and about 20MB of information. I have about 301 HTTP-queries during export, total duration about 3 minutes. I've received many 503-responses, but any 429. The important thing, if you receive 503-response, Quip-API tells you when can you repeat the request (x-ratelimit-reset header). But I don't know whether 429-response gives me the same information in x-ratelimit-reset header. There are any documentation about different http response codes.

Sure, I could treat 429-response in the same way as 503 and wait for several fix seconds before repeating the response, but I am not sure if it works.

How many threads do you have in your Quip Account? Maybe can you run export in Web App (www.quip-export.com) and look in the Browser-Console how 429-response looks like (especially response http-headers)?

Alternatively you could clone the Quip-Export repo, add treating of 429-responses and looks if it works for you.

Another thing... Quip has per-hour limits. I am not sure if it is the right way to freeze all further requests for one hour. Export partial folders might be the right solution in this case (--folders CLI parameter).

from quip-export.

ibrahima avatar ibrahima commented on May 28, 2024

Oh yeah I should clarify that it did work for me. I never got any 429 errors. I was just responding to the original poster who seemed to be concerned about rate limiting/429 errors. I think my account has a bit more documents (about 2000 IIRC) so we probably hit the hourly rate limit but it did still work wonderfully in the end.

I should add that I sometimes get this error message when I've been running the script for a while and try to start over, which I suspect is also due to rate limiting, but I just back off for a bit and try later when that happens.

Quip-Export v2.3.2
ERROR: Token is wrong or expired.

from quip-export.

Related Issues (11)

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.