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

module 'google.cloud.pubsub' has no attribute 'Client' #11

Open jonoj87 opened 7 years ago

jonoj87 commented 7 years ago

I've noticed that the rpi code does not run successfully due to the following error: module 'google.cloud.pubsub' has no attribute 'Client'

After doing some digging I believe its because the google.cloud.pubsub package version 0.28 has changed the objects. Currently I'm going to try and downgrade to version 0.27 and see.

Could you confirm the working versions for all the libraries? We are getting other errors and suspect it could be because of different versions of code.

phuclm commented 7 years ago

you can change this attribute name from 'Client' to 'SubscriberClient'. But it still not work with "unexpected keyword 'project'"

vks1947 commented 6 years ago

hi Jonoj87, I am getting the same error. module 'google.cloud.pubsub' has no attribute 'Client'. were you able to resolve it ?

jonoj87 commented 6 years ago

Hi,

I did yes. It was caused due to the pub sub package module version. If you upgrade pub sub to the latest version, it throws this error, but if you downgrade to version 7 (I think, from memory) then it works. But you shouldn't upgrade then, that version needs to be maintained.

Thanks Jonathan

On Thu., 4 Jan. 2018, 6:58 am vks1947, notifications@github.com wrote:

hi Jonoj87, I am getting the same error. module 'google.cloud.pubsub' has no attribute 'Client'. were you able to resolve it ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Deeplocal/mocktailsmixer/issues/11#issuecomment-355151736, or mute the thread https://github.com/notifications/unsubscribe-auth/Ad8TU9UICtciPEQv1CwC0kIWUgLR3gz6ks5tHAX5gaJpZM4PMdRF .

vks1947 commented 6 years ago

Thanks for your prompt reply Jonathan. I think google has made quite a lot of changes to thier APIs and directory structures..

Cheers.

jonoj87 commented 6 years ago

Yes indeed. A lot of the GitHub link will need to be updated I think with all the changes. We have managed to get it working though.

On Thu., 4 Jan. 2018, 9:11 am vks1947, notifications@github.com wrote:

Thanks for your prompt reply Jonathan. I think google has made quite a lot of changes to thier APIs and directory structures..

Cheers.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Deeplocal/mocktailsmixer/issues/11#issuecomment-355172814, or mute the thread https://github.com/notifications/unsubscribe-auth/Ad8TU6fTdch509yFZt_3B7-fqihsPPZiks5tHCUlgaJpZM4PMdRF .

vks1947 commented 6 years ago

great Jonathan.I really appreciate your help! i am hoping to complete it by tomorrow

I had tough time on step 26. the new API don't have the following path. but after lot of reading and tweaks made it through.

Copy files into embedded assistant directory: $ cp -r mocktailsmixer/software/rpi embedded-assistant-sdk-python/googlesamples/

vks1947 commented 6 years ago

Hi Jonathan,

Hope you are doing well ! . I wanted to know if you got any audio related errors..

I get the following run time errors. when I request for a drink. Asking for weather works fine no issues.

File "/home/pi/env/lib/python3.4/site-packages/sounddevice.py", line 2563, in _check raise PortAudioError(errormsg, err) sounddevice.PortAudioError: Can't write to an input only stream [PaErrorCode -9974]

jonoj87 commented 6 years ago

Hi,

Yes, I run into this error too. It doesn't happen all the time... Sometimes it happens within 5 min, sometimes it works for over 30 min first. I haven't managed to solve it yet... If you find any solution, let me know!

On Mon., 8 Jan. 2018, 1:21 am vks1947, notifications@github.com wrote:

Hi Jonathan,

Hope you are doing well ! . I wanted to know if you got any audio related errors..

I get the following run time errors. when I request for a drink. Asking for weather works fine no issues.

File "/home/pi/env/lib/python3.4/site-packages/sounddevice.py", line 2563, in _check raise PortAudioError(errormsg, err) sounddevice.PortAudioError: Can't write to an input only stream [PaErrorCode -9974]

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Deeplocal/mocktailsmixer/issues/11#issuecomment-355837766, or mute the thread https://github.com/notifications/unsubscribe-auth/Ad8TUxlx_vrGbmw85j5ZZC-dEEDIaJTLks5tIP0PgaJpZM4PMdRF .