On Tue, Apr 16, 2019 at 1:31 PM <jeremytaylo...@gmail.com> wrote: > 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?! >
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: https://googleapis.github.io/google-api-python-client/docs/epy/googleapiclient.discovery-pysrc.html#build_from_document The default logic looks to be here: https://googleapis.github.io/google-api-python-client/docs/epy/googleapiclient._auth-pysrc.html#default_credentials 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_maya+unsubscr...@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. > -- 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_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/CAPGFgA1pM1Fi3p4B2ZGL7%2BWrPYf48oGvfMb_XY%2BruskCH4VJiA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.