Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'module' object has no attribute 'EmbeddedAssistantStub' #16

Open
arcslash opened this issue Jun 25, 2018 · 1 comment

Comments

@arcslash
Copy link

I have changed the code according to the latest commits as follows

in ~/embedded-assistant-sdk-python/googlesamples/rpi/main.py
from google.assistant.embedded.v1alpha1 import embedded_assistant_pb2
to
from google.assistant.embedded.v1alpha2 import embedded_assistant_pb2

And the lines,

ND_OF_UTTERANCE = embedded_assistant_pb2.ConverseResponse.END_OF_UTTERANCE
DIALOG_FOLLOW_ON = embedded_assistant_pb2.ConverseResult.DIALOG_FOLLOW_ON
CLOSE_MICROPHONE = embedded_assistant_pb2.ConverseResult.CLOSE_MICROPHONE

to

END_OF_UTTERANCE = embedded_assistant_pb2.AssistResponse.END_OF_UTTERANCE
DIALOG_FOLLOW_ON = embedded_assistant_pb2.DialogStateOut.DIALOG_FOLLOW_ON
CLOSE_MICROPHONE = embedded_assistant_pb2.DialogStateOut.CLOSE_MICROPHONE

but when it run the following according to tutorial following error results,

(env) pi@raspberrypi:~/embedded-assistant-sdk-python/googlesamples $ python -m rpi
INFO:root:Connecting to embeddedassistant.googleapis.com
Traceback (most recent call last):
  File "/usr/lib/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/pi/embedded-assistant-sdk-python/googlesamples/rpi/__main__.py", line 440, in <module>
    ret_val = setup_assistant()
  File "/home/pi/embedded-assistant-sdk-python/googlesamples/rpi/__main__.py", line 205, in setup_assistant
    assistant = embedded_assistant_pb2.EmbeddedAssistantStub(grpc_channel)
AttributeError: 'module' object has no attribute 'EmbeddedAssistantStub'

@NatiDaddy
Copy link

Damn, I hope I didn't follow you off a cliff. I'm getting the same thing now.
Reading Metadata on the google.assistant.grpc file now about pb2 and will be trying to pick through that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants