Google Assistant on Raspberry pi Segmentation fault
Asked Answered
A

4

7

Installing Google assistant on my pi with this guide: https://developers.google.com/assistant/sdk/guides/library/python/embed/run-sample

(env) pi@raspberrypi:~ $ source env/bin/activate
    (env) pi@raspberrypi:~ $ googlesamples-assistant-hotword --project_id 'celius-54926' --device_model_id 'celius-54926-celius-qyn1r6'
    device_model_id: celius-54926-celius-qyn1r6
    device_id: A1CE24415E5C880BCA74644CD6315DC2

    Segmentation fault
Azov answered 21/5, 2018 at 1:38 Comment(5)
Which version of the SDK do you have? You can find out by running pip freeze.Daedal
(env) pi@raspberrypi:~ $ pip freeze cachetools==2.1.0 certifi==2018.4.16 cffi==1.11.5 chardet==3.0.4 click==6.7 enum34==1.1.6 futures==3.1.1 google-assistant-grpc==0.2.0 google-assistant-library==1.0.0 google-assistant-sdk==0.5.0 google-auth==1.4.1 google-auth-oauthlib==0.2.0 googleapis-common-protos==1.5.3 grpcio==1.12.0 idna==2.6 oauthlib==2.0.7 pathlib2==2.3.2 pkg-resources==0.0.0 protobuf==3.5.2.post1 pyasn1==0.4.2 pyasn1-modules==0.2.1 pycparser==2.18 requests==2.18.4 requests-oauthlib==0.8.0 rsa==3.4.2 six==1.11.0 sounddevice==0.3.11 tenacity==4.12.0 urllib3==1.22Azov
Can you file an issue on the GitHub page: github.com/googlesamples/assistant-sdk-python/issues?Daedal
I am having the same problem and have tried all suggestions (enabled assistant api for the project, used googlesamples-assistant-devicetool to remove and register my devices.) I believe that the devicetool is working because I could register a new device or delete an existing device and see the changes on the device registration page. I tried googlesamples-assistant-hotword and google-assistant-demo and both are giving me Segmentation Fault without further information.Perutz
Also, according to the doc, When you run the sample the first time, it will generate a device instance for your particular device. But after I ran googlesamples-assistant-hotword and then used googlesamples-assistant-devicetool --project-id my-prj-id list --device, there was no device instance created. I manually created one but still got the seg fault.Perutz
P
7

I had the same issue.

I carried on reading the page : https://developers.google.com/assistant/sdk/guides/library/python/embed/run-sample under the heading "Find the device instance ID" it seems my device was not registered.

So I manually registered the device from the pi with the help page here: https://developers.google.com/assistant/sdk/reference/device-registration/device-tool#register-device.

(env) pi@raspberrypi:~ $  googlesamples-assistant-devicetool --project-id YOUR_DEVICE_ID register-device --device 4D609xxxxxxxxxxxxxxxxxxx --model YOUR_MODEL_ID --client-type SERVICE
Creating new device
Error: Failed to register device: 403
Google Assistant API has not been used in project 5739xxxxxxxx before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/embeddedassistant.googleapis.com/overview?project=5739xxxxxxxx then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.

So I followed the link and enabled the API under my google account, and retried.

(env) pi@raspberrypi:~ $ googlesamples-assistant-devicetool --project-id YOUR-PROJECT-ID register-device --device 4D60xxxxxxxxxxxxxxx --model YOUR_MODEL_ID --client-type SERVICE

Creating new device

Device instance 4D60xxxxxxxxx successfully registered

Now it works ok.

Ponderable answered 22/5, 2018 at 13:57 Comment(2)
Thanks. I had the same problem and found out my model_ID was incorrect. Through the process above its easier to uncover the problemOrmandy
Did it, still having same issueGaylenegayler
G
1

I was facing the same issue. After a lot of research, I found that there was a new version of google-assistant-library

Once I upgraded the same to v1.0.1 from 1.0.0, the issue was resolved.

Open your env and run

python -m pip install --upgrade google-assistant-library==1.0.1

Let me know if any issues.

Gaylenegayler answered 4/3, 2019 at 15:47 Comment(0)
A
0

I face same problem for Ubuntu assistant setup, I found my google assistant api was not enabled. I enable it from api console and it started working.

Ankeny answered 15/9, 2018 at 14:30 Comment(0)
T
0

I was facing the same issue in RPi4. Finally the problem was fixed by newer version of the google-assistant library, 1.1.0 instead of 1.0.1 version:

python -m pip install --upgrade google-assistant-library==1.1.0
Tonguetied answered 27/11, 2020 at 21:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.