Using googleapiclient with maya Error

17 views
Skip to first unread message

jeremyt...@gmail.com

unread,
Apr 15, 2019, 9:31:12 PM4/15/19
to Python Programming for Autodesk Maya
Hi,

So for work im trying to build a pipeline and we use google sheets to organize most of it. On the server I have a a module that accesses googlesheets, reads the information and formats it. When I run this all within PyCharm it works fine. It even works when i tell pycharm to use Maya python interpreter where i installed the googleapiclient module.

but when i try to run the module from maya I get this error.

Error: AttributeError: file C:\Program Files\Autodesk\Maya2018\plug-ins\MASH\scripts\googleapiclient\discovery.py line 365: 'Credentials' object has no attribute 'authorize'

Can anyone help?!

Justin Israel

unread,
Apr 15, 2019, 11:49:52 PM4/15/19
to python_in...@googlegroups.com
I know nothing about this api, but a quick search implies that if you don't specifically pass a credentials param, that the api will fallback on resolving some available default credientials implementation:


So its first trying the google.auth impl and then trying the oauth2 impl. Can't be sure from your error which is being found. But it is possible that you are picking up some unexpected Credentials class, since I would expect the google and oauth2 classes to have that method. You could try verifying which class Maya is importing:

from googleapiclient import _auth
C = _auth.default_credentials()
print C, dir(C)

Not sure if that will help. 

Justin



 

--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/9fd9f19a-88aa-4779-9d34-7906dee8c27c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages