googleapis / google-api-python-client

🐍 The official Python client library for Google's discovery based APIs.
https://googleapis.github.io/google-api-python-client/docs/
Apache License 2.0
7.72k stars 2.41k forks source link

Getting AttributeError: module 'six.moves' has no attribute 'collections_abc' on raspberry pi #1151

Closed benaldhouse closed 3 years ago

benaldhouse commented 3 years ago

I can run the Google quickstart.py example script from Visual Studio successfully in Windows using googleapiclient version 1.12.8 but on my Raspberry Pi running Raspbian (version 10 on Pi4b) I get the 'no attribute 'collections_abc'' error with version 1.12.8. I saw a comment from someone saying this problem went away for them when they reverted to version 1.11 (in Ubuntu). I tried this but it made no difference.

https://developers.google.com/sheets/api/quickstart/python https://www.gitmemory.com/issue/googleapis/google-api-python-client/1029/692229742

parthea commented 3 years ago

Please make sure that six is at least version 1.13.0

See this entry from the six change log: https://github.com/benjaminp/six/blob/master/CHANGES#L30

  • Issue #155: Add six.moves.collections_abc, which aliases the collections module on Python 2-3.2 and the collections.abc on Python 3.3 and greater.

I'm going to close off this issue as google-api-python-client already requires six >= 1.13.0, but please re-open this issue with additional information if you're still experiencing the problem after upgrading six.

mridge06 commented 3 years ago

having exactly the same issue, and upgrading six to 1.15.0 made no difference unfortunately. Am very confused

benaldhouse commented 3 years ago

I have just checked. My six is at 1.15.0, too.

On Thu, Jan 7, 2021 at 2:39 PM mjr4917 notifications@github.com wrote:

having exactly the same issue, and upgrading six to 1.15.0 made no difference unfortunately. Am very confused

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/googleapis/google-api-python-client/issues/1151#issuecomment-756156382, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQIIO4Q7Y2S2LMZNGLL2RDDSYXBTTANCNFSM4VQVJ3JQ .

mridge06 commented 3 years ago

i somehow managed to fix this by installing the df2gspread libary which looks like it forced an update to six. Also running a virtual enviroment seems to help!

benaldhouse commented 3 years ago

Thanks mjr4917 I'll have a go at that when I get a moment.

benaldhouse commented 3 years ago

Sadly installing df2gspread hasn't fixed anything for me. What do you mean by a virtual environment? This is all at the very edge of my experience...

benaldhouse commented 3 years ago

I have fixed it! I ran 'pip3 check' which declared 'df2gspread 1.0.4 has requirement google-api-python-client==1.6.7, but you have google-api-python-client 1.12.8.' and so I ran 'pip3 install google-api-python-client==1.6.7' which worked.

Om-ar commented 3 years ago

Thank you so much, it really helped me a lot. :) df2gspread 1.0.4