Tweepy Streaming not working in Python 3.7
See original GitHub issueI used the following code to stream data via Tweepy in Python 3.7 However, it always returns an error like this: I am assuming that it is not taking the async attribute anymore in Python 3.7. When I ran streaming.py from my system in the local tweepy module folder, it still showed an error for the async attribute as invalid syntax.
Error:-
File "C:\Users\Student\AppData\Local\Programs\Python\Python37-32\lib\site-packages\tweepy\streaming.py", line 358
def _start(self, async):
^
SyntaxError: invalid syntax
Code:-
auth=tweepy.OAuthHandler(consumer_key, consumer_secret)
auth.set_access_token(access_key, access_secret)
api=tweepy.API(auth)
class MyStreamListener(tweepy.StreamListener):
def on_data(self, data):
print(data)
return True
def on_error(self, status):
print(status)
myStreamListener = MyStreamListener()
myStream = Stream(api.auth, listener=myStreamListener)
myStream.filter(track=['hello'])
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (4 by maintainers)
Top Results From Across the Web
python 3.x - Tweepy streaming error - Stack Overflow
"pip install tweepy" is still not currently functioning with python 3.7, roll back to 3.6.OB1 (and ignore the pip update recommendations).
Read more >Changelog — tweepy 4.12.1 documentation
Fix tweepy.debug() to work in Python 3. Fixed issue #529 - StreamListener language filter stopped working. Add Documentation Page for streaming ...
Read more >tweepy · PyPI
Alternatively, install directly from the GitHub repository: pip install git+https://github.com/tweepy/tweepy.git. Python 3.7 - 3.11 are supported.
Read more >Build 2421896389 | tweepy/asynchronous/streaming.py
1 # Tweepy
2 # Copyright 2009‑2022 Joshua Roesslein
3 # See LICENSE for details.
5 import asyncio 3×
Read more >Ingesting Tweets via the Twitter API - Databricks
In this notebook, we will be pulling Tweets via the Twitter API using Tweepy, an easy-to-use, open-source Python library. In addition, we will...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Duplicate of #1017 and fixed with #1042. When submitting issues, please make sure you’re on the most recent development version. Otherwise, see #1063.
That’s not relevant to this issue. GitHub issues for this repository should be used to report issues with this library. They are not a medium for requesting help with Python or other software.