.async syntax error while installing google assistant sdk in raspberry Pi

834 Views Asked by At

I am using python 3.7.3 version and I am getting an syntax error.

(env) pi@raspberrypi: $ googlesamples-assistant-pushtotalk-project-id ***** --device-model-id ********

Traceback (most recent call last):

File "/home/pi/env/bin/googtesamples assistant-pushtotalk", line 5, in from googlesamples.assistant.grpc.pushtotalk import main

File "/home/pi/env/Lib/python3.7/site-packages/googlesamples/assistant/grpc/pushtotalk.py", line 29, in

from tenacity import retry, stop_after_attempt, retry if exception

File "/home/pi/env/lib/python3.7/site-packages/tenacity/ init__.py", line 292

from tenacity.async import AsyncRetrying

SyntaxError: invalid syntax
1

There are 1 best solutions below

0
Nguyễn Văn Gia Huy On

I have the same issue when trying to use the push-to-talk command. I also try to fix the issue by using

pip install -U tenacity

But instead of fixing i got another error: no such option --project-id

After a quick research i come down to this solution:

// upgrade google-assistant-library
$ python3 -m pip install --upgrade google-assistant-library

//Run the demo
google-assistant-demo --project-id PROJECT_ID --device-model-id DEVICE_MODEL

You can then use the hotword like Ok Google or Hey Google, it works like a charm.

Hope this works for u as well.

Originally posted here: https://github.com/googlesamples/assistant-sdk-python/issues/411``