Google assistant “No module named googles…”

流过昼夜 提交于 2019-12-03 12:45:47

问题


Whenever I run this command

py -m googlesamples.assistant.auth_helpers -client-secrets <secrete-location> 

I get an error saying:

C:\Users\chand\AppData\Local\Programs\Python\Python36\python.exe:
  No module named googlesamples.assistant.auth_helpers

I'm not sure what the issue is as it worked on a different device with the same steps.


回答1:


As per version 0.3.0 of the SDK the gRPC samples are using a different auth helpers.

pip install --upgrade google-auth-oauthlib[tool]
google-oauthlib-tool --client-secrets path/to/client_secret_XXXXX.json --scope https://www.googleapis.com/auth/assistant-sdk-prototype --save --headless

From there, you should be able to follow the instructions from the SDK package and gRPC package page and explore the reference sample




回答2:


I got this error when I didn't enter the voice shell

. /home/pi/bin/voice-recognizer-shell.sh

then rerun

(env) pi@raspberrypi:~/voice-recognizer-raspi $ ./src/main.py



回答3:


I have got the same Issue and I used these commands

python3 -m pip install --upgrade google-auth-oauthlib[tool]

google-oauthlib-tool --scope https://www.googleapis.com/auth/assistant-sdk- prototype \
  --scope https://www.googleapis.com/auth/gcm \
  --save --headless --client-secrets /path/to/client_secret_client-id.json

Be Sure to replace the path to client_Secrets file.

It worked for me. Hope this helps.



来源:https://stackoverflow.com/questions/44056237/google-assistant-no-module-named-googles

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!