sfquickstarts icon indicating copy to clipboard operation
sfquickstarts copied to clipboard

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

Open ranya-snow opened this issue 3 years ago • 5 comments

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!

ranya-snow avatar Sep 29 '22 12:09 ranya-snow

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

jdanielmyers avatar Sep 29 '22 16:09 jdanielmyers

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'

myshon avatar Oct 18 '22 12:10 myshon

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

aditya-pawar avatar Jun 25 '23 13:06 aditya-pawar

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.

glsdown avatar Feb 15 '24 09:02 glsdown

+1 on request to get this updated

sfc-gh-DShaw98 avatar Mar 14 '24 20:03 sfc-gh-DShaw98