rhiever / reddit-twitter-bot

Looks up posts from reddit and automatically posts them on Twitter.
GNU General Public License v3.0
137 stars 38 forks source link

no module named urllib.parse #5

Closed lucakiebel closed 6 years ago

lucakiebel commented 8 years ago

Hey! I have a problem using the script. When I try starting it, bash says:

Traceback (most recent call last): File "reddit_twitter_bot.py", line 27, in import urllib.parse ImportError: No module named parse

I tried searching for and installing urllib.parse, but it doesn't seem to work.

I am on Ubuntu 15.10 if that makes any difference!

rhiever commented 8 years ago

What version of Python are you running?

Siriusa77II commented 7 years ago

Hi!
I have same problem...
i run python 2.7 and python 3.4.2
i'm sorry for answer this verry old issue.

root@Lyra:~/bot/twitter/reddit# python reddit_twitter_bot.py Traceback (most recent call last): File "reddit_twitter_bot.py", line 27, in <module> import urllib.parse ImportError: No module named parse

AddaxSoft commented 6 years ago

this solved the problem for me:

pip install six

then modify the import line 27 to:

#import urllib.parse
from six.moves.urllib.parse import urlparse