hqtrivia-automation icon indicating copy to clipboard operation
hqtrivia-automation copied to clipboard

"Import Error: No Module named ..."

Open jmelman87 opened this issue 7 years ago • 2 comments

I'm having an issue with vocabulary.vocabulary . I get the following error.

File "hqtrivia-automation.py", line 9, in import Vocabulary # online dictionary ImportError: No module named Vocabulary

Help please?

jmelman87 avatar Dec 26 '17 23:12 jmelman87

Additionally, I am confused altogether on how I am supposed to use this. I have Google Vision. Could someone please help me out and walk me through exactly how to run this? I am not the best with programming, but this project really interests me.

jmelman87 avatar Dec 26 '17 23:12 jmelman87

Sorry for slow response. Been gone on a long vacation over the holidays.

For missing module, did you run the following... pip3 install -r requirements.txt

If so, type... pip3 list And comment back with results.

Also type... python3 -m site And see if vocabulary.py is located in any of those directories the above spits out.

For google vision setup yes the docs on this are a HUGE mess. Unfortunately I blazed through without documenting how I figured it out but after some research I think I followed this doc https://googlecloudplatform.github.io/google-cloud-python/latest/core/auth.html which ultimately lead to https://cloud.google.com/storage/docs/authentication#generating-a-private-key. That doc shows how to generate a .json auth key for the service account (may have to create one) connected to your google vision. So do the following...

  1. Follow steps here https://cloud.google.com/storage/docs/authentication#generating-a-private-key for creation .json file
  2. Put the .json file in same directory as hqtrivia-automation script and rename it to gvision_auth.json

Download latest hqtrivia-automation script and test again.

blissend avatar Jan 11 '18 22:01 blissend