ksasso1028 / Juicestore-Bot

Checkout bot capable of monitoring site and sending a text message via twilio when the desired item is found
10 stars 6 forks source link

ModuleNotFoundError: No module named 'urlparse' #1

Open mattadamson opened 4 years ago

mattadamson commented 4 years ago

Hi

When I run this from IDLE after using pip to install the twillo dependency we see

ModuleNotFoundError: No module named 'urlparse'

Traceback (most recent call last): File "/Users/madamson/Documents/python/juicebot.py", line 3, in from twilio.rest import Client File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/twilio/init.py", line 11, in from .rest.exceptions import TwilioRestException File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/twilio/rest/init.py", line 1, in from .base import set_twilio_proxy File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/twilio/rest/base.py", line 6, in from twilio.rest.resources import Connection File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/twilio/rest/resources/init.py", line 5, in from .base import ( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/twilio/rest/resources/base.py", line 18, in from .connection import Connection File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/twilio/rest/resources/connection.py", line 1, in from .imports import ( File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/twilio/rest/resources/imports.py", line 5, in from cgi import parse_qs ImportError: cannot import name 'parse_qs' from 'cgi' (/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/cgi.py)

Thoughts please?

Thanks

ksasso1028 commented 4 years ago

Please provide system details.

Its very strange as that error stems from importing the same twilio library you just downloaded. please very refer to here for more details on twilio https://pypi.org/project/twilio/

I would try running the file from command line, this is how it was tested

ksasso1028 commented 4 years ago

I have added additional details incase you did not configure your bot correctly

Make sure you enter your twilio details into your bot constructor and uncomment self.client. On line 60 you will uncomment the text message portion and replace "from" with your twilio number. In the monitor function you can replace the URL in the first line if you would like(only works on juicestore and will only buy shoes at the moment)