question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Max retries exceeded

See original GitHub issue

I run a code twarc search blah-blah > search.jsonl, I already got almost 400 thousands tweets. Then, I got the error below:

ERROR caught connection error HTTPSConnectionPool(host=‘api.twitter.com’, port=443): Max retries exceeded with url: /1.1/search/tweets.json?count=100&q=%23HurricaneDorian2019+OR+%23Dorian2019+OR+%23HurricaneDorian&include_ext_alt_text=true&lang=en&result_type=recent&tweet_mode=extended&max_id=1167786952499900416 (Caused by NewConnectionError(‘<urllib3.connection.VerifiedHTTPSConnection object at 0x103cb62b0>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known’)) on 162 try

This error had been reported before in twarc.log, but this time I got the error below in command line: RecursionError: maximum recursion depth exceeded in __instancecheck__

I think this is because of the recursive methods in decorates.py function, in rate_limit class. Is it correct? If so, is there any way to fix it?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
edsucommented, Sep 4, 2019

Interesting! Maybe it was a temporary network error?

One thing you can do to pick up where you left off (without having to collect all 400k tweets is to get the ID of the last tweet you were able to collect and then pick up there. One handy way of getting the last tweet id in your file would be to use jq.

tail -1 tweets.jsonl | jq .id_str 

Then you can tell twarc to search for tweets earlier than that tweet:

twarc search '#HurricaneDorian2019 OR #Dorian2019 OR #HurricaneDorian' --max_id 1169272246537457671 > tweets2.jsonl
0reactions
pbabveycommented, Sep 4, 2019

All right. Of course. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Max retries exceeded with URL in requests - Stack Overflow
This happens when you send too many requests to the public IP address of https://itunes.apple.com . It as you can see caused due...
Read more >
(Python) ConnectionError: Max retries exceeded with url
To solve the requests ConnectionError: Max retries exceeded with url, use a `Retry` object and specify how many connection-related errors to retry on...
Read more >
Fix “Max retries exceeded with URL” error in Python ... - LinuxPip
Another way that you can avoid “Max retries exceeded with URL” error, especially when the server is busy handling a huge number of...
Read more >
Fix Requests Max Retries Exceeded With Url in Python
The “Max retries exceeded with url” error is caused by an invalid URL, server overloading, failed SSL verification, unstable internet connection ...
Read more >
max-retries-exceeded exceptions are confusing #1198 - GitHub
In urllib3 it seems the confusing errors can be triggered here via requests. It'd almost be nice to only raise a MaxRetryError when...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found