Snowflake-Labs / sfquickstarts

Follow along with our tutorials to get you up and running with the Snowflake Data Cloud.
Apache License 2.0
299 stars 563 forks source link

Outdated Tweepy API in "Auto-Ingest Twitter Data into Snowflake" Quickstart #386

Open ranya-snow opened 1 year ago

ranya-snow commented 1 year ago

Hi there,

I have tried following this quickstart which should be pretty straightforward, however I am facing issues which I believe are linked to Tweepy having updated their docs: https://docs.tweepy.org/en/stable/streaming.html as well as Twitter having updated their API version and permissions.

Following the exact instructions in twitter_local.py as they are won't work. I believe one would ened to import Stream and/or StreamingClient from tweepy, and the Twitter bearer token should be included as well, something like this: myStream = tweepy.StreamingClient('insert bearer token')

I am not being very helpful but I am not familiar with Python at all! Hope someone can take a look at this.

Thanks!

jdanielmyers commented 1 year ago

Hey - thanks for letting us know. we will look into it

myshon commented 1 year ago

I stucked on step 6 in tutorial: https://quickstarts.snowflake.com/guide/auto_ingest_twitter_data due to error

twitter_local.py", line 77, in <module>
    class JSONStreamProducer(tweepy.StreamListener):
AttributeError: module 'tweepy' has no attribute 'StreamListener'
aditya-pawar commented 1 year ago

Issue still exists the for Auto-Ingest Twitter Data into Snowflake" Quickstart. Please fix it.

glsdown commented 4 months ago

A fix for the AttributeError: module 'tweepy' has no attribute 'StreamListener' error is to downgrade tweepy to 3.10 using: pip install tweepy~=3.10.0 instead, although even having got past that error I believe Twitter have changed their endpoints as the code returns Error: 404.

This is recommended learning for the SnowPro Advanced Data Engineering qualification in their study guide, so it's a shame it hasn't yet been resolved.

sfc-gh-DShaw98 commented 3 months ago

+1 on request to get this updated