gauravsacc/MMM-GoogleAssistant

Syntax Error

Closed this issue · 5 comments

I've done everything correctly and I'm on the last step but when I tried to run the assistant.py file, I get a syntax error...

pi@raspberrypi:~ $ /home/pi/env/bin/python3 -u assistant.py
File "assistant.py", line 61
pubnub.publish().channel("magicmirror").message("hello from python!").async(my_publish_callback)
^
SyntaxError: invalid syntax
pi@raspberrypi:~ $

same error pls help

I fixed this by changing all '.async's in the file with '.pn_async'. It seems the publish method was renamed

Reference: #51

@reubenvickers Thank you! It went through but now it says

pi@raspberrypi:~ $ /home/pi/env/bin/python3 -u assistant.py
pubnub subscription completed
Segmentation fault
pi@raspberrypi:~ $

I will try to find another solution but thank you very much. I wouldn't have been able to figure that out lol

I know this is closed now, but I believe if you cd into ~/MagicMirror/Modules/MMM-GoogleAssistant/pi
before running /home/pi/env/bin/python3 -u assistant.py, it should work.

Screen Shot 2020-04-28 at 10 12 25 PM

Nope, Still said the same thing @reubenvickers