Deeplocal / mocktailsmixer

Make a DIY Robotic Mocktails Mixer Powered by the Google Assistant SDK
http://deeplocal.com/mocktailsmixer
MIT License
391 stars 62 forks source link

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

Open arcslash opened 6 years ago

arcslash commented 6 years ago

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 commented 5 years ago

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.