Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Command: assistant_library_demo.py for Voice 1.0 not working #688

Closed
mgl1206 opened this issue May 24, 2020 · 8 comments
Closed

Command: assistant_library_demo.py for Voice 1.0 not working #688

mgl1206 opened this issue May 24, 2020 · 8 comments

Comments

@mgl1206
Copy link

mgl1206 commented May 24, 2020

Um I may have done this issue thing wrong but I’ve set up my voice kit and am trying to run the demo on it. But keep giving me the same error code.
E1E11298-A46C-4111-B63A-EE98346F5B4A
I’ve asked a relative for help who’s a programmer but we haven’t been able to solve the issue.

@mgl1206 mgl1206 changed the title assistant_library_demo.py for Voice 1.0 not working Command: assistant_library_demo.py for Voice 1.0 not working May 24, 2020
@manoj7410
Copy link

Can you try to implement the solution given at #658 (comment) and see if it works for you ?

@jrgleason
Copy link

jrgleason commented Jun 16, 2020

@manoj7410 Same issue here. Once you do that you get...

~/Code/aiyprojects-raspbian/src/examples/voice $ ./assistant_library_demo.py
Segmentation fault

Full

./assistant_library_demo.py
Please visit this URL to authorize this application: https://accounts.google.com/o/oauth2/auth?response_type=code&...
INFO:google_auth_oauthlib.flow:"GET /?state=saKbz8sIS31iQkZv28aX0UEjmZMU0n&code=...&scope=https://www.googleapis.com/auth/assistant-sdk-prototype HTTP/1.1" 200 65
INFO:root:OAuth credentials initialized: /home/pi/.cache/voice-recognizer/assistant_credentials.json
Segmentation fault

@jrgleason
Copy link

More info (I think)

python3.7 -q -X faulthandler ./assistant_library_demo.py
Fatal Python error: Segmentation fault

Current thread 0x76f82ad0 (most recent call first):
  File "/usr/local/lib/python3.7/dist-packages-linux_armv7l/google/assistant/library/assistant.py", line 98 in __init__
  File "/home/pi/AIY-projects-python/src/aiy/assistant/library.py", line 78 in __init__
  File "./assistant_library_demo.py", line 65 in main
  File "./assistant_library_demo.py", line 71 in <module>
Segmentation fault

@jrgleason
Copy link

Looks like this might be related to googlesamples/assistant-sdk-python#345

@manoj7410
Copy link

Can you run "pip3 install google-assistant-library==1.0.0" and then try the assistant library demo ?

@mgl1206
Copy link
Author

mgl1206 commented Jun 23, 2020

I think I have fixed the issue. I tried out the solution for Issue #658. I opened the file and changed the code from “-1” to “preferred=true”. And so I tried it again but it didn’t work saying that true was undefined. After trying out some other thing so decided to try and follow the path that it was giving me for the original problem and changed “preferred=true” to “-1”. I ran the command “./assistant_library_demo.py” again but instead of the error code it gave me the link for authorization.

Now however I have been given a segmentation fault. Which is the problem that jrgleason has currently. The joys of coding.

EDIT: YES IT WORKS!!
I ran the command
“pip3 install google-assistant-library”
which fixed the segmentation fault I assume.
Btw the command
“pip3 install google-assistant-library==1.0.0”
Does not work because it’s no longer supported if I’m not mistaken.
EDIT EDIT: So the command “pip3 install google-assistant-library==1.0.0” might work on certain versions since the rfjohnso was able to use the command while for me I was told that it couldn’t be done since I required versions above it. I don’t know why that happened but apparently it does. So to be safe you might wanna try putting in both commands.

@rfjohnso
Copy link

rfjohnso commented Jun 24, 2020

I've just tried the above solution and it is still giving a segmentation fault. RaspPi3b+, version 1 of AIY, latest Raspbian image.
I was able to get around the first error in issue #658 but still getting segmentation fault after pip3 install google-assistant-library.
I tried also changing line 75 with -1, Preferred=True and without either. Did I miss something else?

EDIT: right after I posted I decided to try pip3 install google-assistant-library==1.0.0 instead. It worked that way, so it is supported as it turns out!

@mgl1206
Copy link
Author

mgl1206 commented Jun 25, 2020

@rfjohnso ok thx I’ll update I’m comment.

@mgl1206 mgl1206 closed this as completed Jun 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants