sushant10 / HQ_Bot

📲 Bot to help solve HQ trivia
MIT License
173 stars 92 forks source link

Error While Running Bot #60

Closed Hd1440 closed 6 years ago

Hd1440 commented 6 years ago

So I installed all the packages that are needed however when I go to open a cmd in the HQ Bot folder to run it by using the line given --> python3 answer_bot.py it tells me that there is no such command as python3 so I just take out the 3 and then it gives me this error:

python answer_bot.py Traceback (most recent call last): File "answer_bot.py", line 17, in import urllib.request as urllib2 ImportError: No module named request

Any help is appreciated.

tanujyadav97 commented 6 years ago

replace utllib.request with urllib2 in import and replace urllib.request() with urllib2.Request()

Hd1440 commented 6 years ago

@tanujyadav97 Sorry I am a bit confused, do you mean that I should just take out the "urllib.request as" in line 17? And I cannot find urllib.request() in the file to replace, what line is it?

tanujyadav97 commented 6 years ago

@Hd1440 replace "import urllib.request as urllib2" with "import urllib2"

Hd1440 commented 6 years ago

Alright thanks that worked @tanujyadav97