bear / python-twitter

A Python wrapper around the Twitter API.
Apache License 2.0
3.41k stars 957 forks source link

('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) #630

Open aaronn opened 5 years ago

aaronn commented 5 years ago

I seem to be getting ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer')) randomly. I can't replicate it. What's the correct way to handle this? I'm not totally sure what it means– it seems like there are many explanations for this error online; some implying that the solution is to add a sleep for 0.01s before each request? 🤔

colegleason commented 5 years ago

I am also getting this randomly. did you find any solution @aaronn?

oriolj commented 5 years ago

what version of python are you using? I'm on 2.6 and I think it may be related to SSL issues with urllib3 and python 2.6.

effleurager commented 4 years ago

This is an issue on 3.8.1 as well, so it's not that 🤷🏽‍♂️

speechwrecko commented 4 years ago

Has anybody found a solution to this? We are see the same problem

colegleason commented 4 years ago

I've been catching the error and retrying for N number of times. I'm not 100% sure, but it seems like Twitter's API might be cutting off the connection. Maybe python-twitter could help with automatic retry capability?

On Tue, Jun 16, 2020 at 7:27 PM Jason Flaks notifications@github.com wrote:

Has anybody found a solution to this? We are see the same problem

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/bear/python-twitter/issues/630#issuecomment-645061460, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABYXB4JYIAI6EPVZIK2OF3RW75U3ANCNFSM4IN4LRFQ .

-- Cole Gleason

Student, Carnegie Mellon University Email: cg@colegleason.com Website: colegleason.com

khaerulumam42 commented 3 years ago

Me too, I think its because requests or urllib3 package, but not found any idea so far. Maybe this stackoverflow link can help you guys