Error trying to access “google drive” with python (google quickstart.py source code)

前端 未结 3 1898
迷失自我
迷失自我 2021-01-13 00:00

I\'m trying to learn how to access Google Drive from Python but I have problems.

I followed the tutorial of google\'s official website: https://developers.google.co

相关标签:
3条回答
  • 2021-01-13 00:40

    I have found the problem, it was that I had not put my email address and client name at "Consent screen" section.

    Now it works good.

    0 讨论(0)
  • 2021-01-13 00:50

    Actually adding the code mentioned above fixes the problem entirely.

    import logging
    logging.basicConfig(filename='debug.log',level=logging.DEBUG)
    
    0 讨论(0)
  • 2021-01-13 00:51

    The module in question oauthclient.util makes some assumptions that there is logging established and this warning is actually masking a more detailed warning/error which it tried to write to the log.

    If you add some logging to your own code then it should reveal the underlying error:

    import logging
    logging.basicConfig()
    

    was enough to replace the appearance of the above error with the true error in my output (YMMV).

    Once that's resolved you can probably remove these two lines safely (although you'll probably wind up back here should something else go wrong).

    This question came up in a google search for No handlers could be found for logger "oauth2client.util" alongside this issue and this issue.

    0 讨论(0)
提交回复
热议问题