Error: You need client secrets to use the Assistant API
luddiluddludde opened this issue · 2 comments
I've created the client secrets, and downloaded them into the file assistant.json and places it in the /home/pi folder. Still, when running bash install.sh, I get the error saying it needs the client secrets...
What am I doing wrong?
Are you running the install.sh
script as a user other than pi
? If you run echo $HOME
in the terminal, it should tell you the directory to put the assistant.json
file in. This is a bug I need to fix in the script, since if you are not running as the pi
user, then it should not tell you to put the file within /home/pi
.
I ran the install script from /home/pi, and have assistant.json in /home/pi, and I get the same type of error:
INFO:root:OAuth credentials initialized: /home/pi/.cache/voice-recognizer/assistant_credentials.json
Traceback (most recent call last):
File "src/AssistantPi.py", line 8, in
assistant.main()
File "/home/pi/AIY-projects-python/src/examples/voice/assistant_library_with_local_commands_demo.py", line 84, in main
with Board() as board, Assistant(credentials) as assistant:
File "/home/pi/AIY-projects-python/src/aiy/assistant/library.py", line 40, in init
self._model_id = device_helpers.register_model_id(credentials)
File "/home/pi/AIY-projects-python/src/aiy/assistant/device_helpers.py", line 76, in register_model_id
project_id = _get_project_id()
File "/home/pi/AIY-projects-python/src/aiy/assistant/device_helpers.py", line 39, in _get_project_id
return client_secrets_data["installed"]["project_id"]
KeyError: 'installed'