akshaybahadur21 / Smart_Mirror

MIT License
26 stars 15 forks source link

Python bot.py #5

Closed ghadisaurabh closed 6 years ago

ghadisaurabh commented 6 years ago

I got this error. Are there any dependencies to install for this like python library? $ python bot.py Traceback (most recent call last): File "bot.py", line 13, in from apiclient.discovery import build ModuleNotFoundError: No module named 'apiclient'

akshaybahadur21 commented 6 years ago

You should be able to get these dependencies with this simple install:

sudo pip install --upgrade google-api-python-client

ghadisaurabh commented 6 years ago

Thanks... For houndify which module should I install ? I have created account on houndify and placed all required keys and ID also but again got the same error "Module Not found"

akshaybahadur21 commented 6 years ago

I have attached houndify.py file with the document. Make sure bot.py is able to import that class. Attach stacktrace so that I can identify the bug. Please open new issue for new bugs.

ghadisaurabh commented 6 years ago

This is the error: $ python bot.py Traceback (most recent call last): File "bot.py", line 19, in import houndify ModuleNotFoundError: No module named 'houndify'

cowboysdude commented 6 years ago

When I run this sudo pip install --upgrade google-api-python-client I get this Requirement already up-to-date: google-api-python-client in /usr/local/lib/python2.7/dist-packages Requirement already up-to-date: httplib2<1dev,>=0.9.2 in /usr/local/lib/python2.7/dist-packages (from google-api-python-client) Requirement already up-to-date: oauth2client<5.0.0dev,>=1.5.0 in /usr/local/lib/python2.7/dist-packages (from google-api-python-client) Requirement already up-to-date: uritemplate<4dev,>=3.0.0 in /usr/local/lib/python2.7/dist-packages (from google-api-python-client) Requirement already up-to-date: six<2dev,>=1.6.1 in /usr/local/lib/python2.7/dist-packages (from google-api-python-client) Requirement already up-to-date: pyasn1>=0.1.7 in /usr/local/lib/python2.7/dist-packages (from oauth2client<5.0.0dev,>=1.5.0->google-api-python-client) Requirement already up-to-date: pyasn1-modules>=0.0.5 in /usr/local/lib/python2.7/dist-packages (from oauth2client<5.0.0dev,>=1.5.0->google-api-python-client) Requirement already up-to-date: rsa>=3.1.4 in /usr/local/lib/python2.7/dist-packages (from oauth2client<5.0.0dev,>=1.5.0->google-api-python-client)

akshaybahadur21 commented 6 years ago

@cowboysdude -that means your requirements are upto date for google api client

akshaybahadur21 commented 6 years ago

@ghadisaurabh this usually happens when bot.py is unable to identify houndify.py. Make sure that they are in the same directory.

cowboysdude commented 6 years ago

Well yeah but it still won't run.... not sure why.

akshaybahadur21 commented 6 years ago

@cowboysdude @raghavpatnecha Can you share the stacktrace?

Jamieleebrett commented 6 years ago

having trouble with the same thing.

File "bot.py", line 20, in from speech import Speech File "/home/pi/Smart_Mirror/speech.py", line 7, in from pydub import AudioSegment ImportError: No module named pydub

Is there anyway you could do a video tutorial. I think you have an incredible project. It'd be great to get it working!

Josh4you commented 6 years ago

4 For the apiclient Error

step 1. you have to install googleapi client by sudo pip install --upgrade google-api-python-client step 2. if the problem still persist then you need to set a path in bot.py file by sys.path.append("/home/usr/smartmirror/hhsmartmirror/lib/python2.7/dist-packages")

Hope this sloves the issue