geduldig / TwitterGeoPics

Python scripts for geocoding tweets and for downloading images embedded in tweets.
9 stars 7 forks source link

py3: STOPPED module 'urllib' has no attribute 'urlretrieve' #4

Closed drandreaskrueger closed 6 years ago

drandreaskrueger commented 6 years ago

also see my pull request https://github.com/geduldig/TwitterGeoPics/pull/3

not working with python3 at the moment

see my improved README for how to run into this error:

python -u -m TwitterGeoPics.SearchOldTweets -words '#devcon'  -photo_dir ./photos/hashtag_devcon -oauth twitterapi-oauth.txt 

arizalasega: RT @Aion_Network: The Aion team at Devcon hosting the Unicorn Party and Pitches #devcon3 #ethereum #aionnetwork #eth #AION https://t.co/mT2…
Sun Nov 05 17:09:22 +0000 2017

kurihei: Ethereumはアプリ層が多いのでDevconの方が派手な感じは受けるな。両方ともレベル高すぎだけど。
Sun Nov 05 17:07:33 +0000 2017

jstnclmnt: host nalang for devcon ahuhuhi
Sun Nov 05 17:05:48 +0000 2017

DavidBurela: Final #Devcon3 day 4 writeup is online. p2p tech, supply chains. https://t.co/ZYmXne7T65 https://t.co/4tELydq0Vh
Sun Nov 05 17:05:11 +0000 2017
*** STOPPED module 'urllib' has no attribute 'urlretrieve'

then I tried python2, and with that it is working fine.

Thanks a lot for this project, very useful!

drandreaskrueger commented 6 years ago

I simply continued in py2

geduldig commented 6 years ago

Do you have the urllib3 for python3?

pip3 install --upgrade urllib3

drandreaskrueger commented 6 years ago

ye, now that explains that.
Perhaps include that hint in your dependencies?

https://github.com/geduldig/TwitterGeoPics#dependencies

https://github.com/geduldig/TwitterGeoPics/blob/master/setup.py#L26