New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'NoneType' object has no attribute 'strip' exception in streaming.py #576
Comments
I also met this problem few hours ago... |
Also getting it here |
Got the same error. Traceback (most recent call last):^M Seems like the error does not appear in former versions several months ago as they run stable for me. |
Just got this today as well. |
Same issue here. So did you just roll back to a previous release to resolve the issue? |
I was running tweepy 3.3.0 (which is not a stable release). Rolling back to 3.2.0 resolved the issue for me. |
I encountered the same issue. Will downgrade to 3.2.0 as pointed by @nomeyer |
Working on getting the NoneType AttributeErrors handled. This is due to [an issue in Tweepy](tweepy/tweepy#576)
Hey Guys! I FOUND A SOLUTION!!! This problem is due to the program has streamed some problematic twitter data. To avoid this, you can add a AttributeError dectection part in related part of streaming.py in tweepy lib to pass this annoying problem. After doing this, I haven't got this problem in the latest 10 days. def _run(self):
|
Thanks @dengjiaxian, I will test this out and see how it goes. |
@dengjiaxian I tried with your updated streaming.py. I have been streaming the geolocated tweets successfully for three days. But just couple of hours ago, there is another error raised. Does it happen to you? Any solution? Traceback (most recent call last): I do not understand why there is the 'NoneType' error. I thought adding the following exception in _read_loop can capture such error. |
#698 had the same problem. |
Got same error in python 2.7 tweepy 3.5.0.. Let me know If anyone has solution on this File "AIFW2016.py", line 33, in |
I am having the same problem as @Jugaadu |
Me too! |
Encountered this problem yesterday for the first time. Still no fix? |
+1 |
+1. I have had this issue since I started using Tweepy ~ 3 weeks ago. Have always been using the most up to date version of Tweepy (currently 3.5 on python 2.7.11). It can be days between occurrences of the error, but it always invariably comes up and kills the process. |
+1 |
Same issue for me with Tweepy version 3.5.0, happens sporadically (every few days, generally):
It's a problem in streaming.py, and the only time
Perhaps |
I have rolled back to previous version of tweepy 3.2.0, It doesn't throw this error now. Tweepy 3.5.0 have a bug. Please use previous version |
For those who just want a quick fix, this worked for me: f4bfce5 You simply need to modify the steaming.py file that is located in your python path. The hotfix I did, which has been working without error for > 10 days now went as follows:
Done! Now we have a new streaming.pyc and when you import tweepy it will import the newly modifed version, which should not suffer from this bug. Not saying it is the best fix design-wise, but it has worked for me without error! |
I'm also affected by this, I applied f4bfce5, will report back if it crashes again. Please consider building a release 😄 |
Got this today: |
'NoneType' object has no attribute 'strip' exception in streaming.py Source is from: tweepy/tweepy#576 Changes taken from: benfei/tweepy@d40ee87
Hi, I faced with the similar issue and found out a temporary solution. The following solution works for 3.5v of tweepy. Please update this code as temporary fix in the repository which might help other people like. Please find the solution below: while self.running and not resp.raw.closed: length = 0 while not resp.raw.closed: line = buf.read_line() if line: line = line.strip() #line = buf.read_line().strip() if not line: self.listener.keep_alive() # keep-alive new lines are expected elif line.isdigit(): |
@tejasshah17 I tried your fix but I get:
Im using 3.5v tweepy |
I went through the
As it is stated, However, I noticed that the HTTP connection dependency of
I am not sure whether this method is smart enough to combat with Sad thing is that |
@shaochengcheng: As stated here, I'll be continuing to work on Tweepy. |
Closed in c1eddf1. |
Yeah great @Aaron1011 ! I will test it soon ! |
This fix is not deployed to PyPi yet, right? |
There hasn't been a Tweepy release since November 2015, so no. |
Sorry - I'm still unable to push new releases to PyPi. I will as soon as I'm granted access. |
@Aaron1011 do you have any idea when will you have PyPi access? It's sad to see such a trivial bugs not being fixed! Anyway, thanks for your hard work! |
@Aaron1011 If you don't see this happening, please consider getting tweepy4 or something similar on PyPI. |
Is this fix available in PyPi yet? Can I use pip to pull it down? Having this issue in my bot currently - also - thanks for the fix, Tweepy is a wonderful piece of software. |
I face the same error too In a couple of minutes got this error Anyone else faced this issue? |
Run into same error today,
Is there any solution to this? |
@weijchen Easy solution - rollback to tweepy 3.2.0 |
@Jugaadu Thanks! |
You should update requests requirement while you are in there. |
streaming.py threw the following exception:
The text was updated successfully, but these errors were encountered: