nithinmurali / pygsheets

Google Sheets Python API v4
https://pygsheets.readthedocs.io/en/latest
Other
1.51k stars 220 forks source link

google-auth-oauthlib 0.6.0 issue with auth #558

Closed vincentbellitto closed 1 year ago

vincentbellitto commented 1 year ago

Note, if this is a usage question, please ask a question in stackoverflow with pygsheets tag.

Describe the bug A clear and concise description of what the bug is.

[2022-10-31, 12:10:56 PDT] {subprocess.py:92} INFO -     import pygsheets
[2022-10-31, 12:10:56 PDT] {subprocess.py:92} INFO -   File "/usr/local/lib/python3.10/site-packages/pygsheets/__init__.py", line 14, in <module>
[2022-10-31, 12:10:56 PDT] {subprocess.py:92} INFO -     from pygsheets.authorization import authorize
[2022-10-31, 12:10:56 PDT] {subprocess.py:92} INFO -   File "/usr/local/lib/python3.10/site-packages/pygsheets/authorization.py", line 8, in <module>
[2022-10-31, 12:10:56 PDT] {subprocess.py:92} INFO -     from google_auth_oauthlib.flow import Flow, InstalledAppFlow
[2022-10-31, 12:10:56 PDT] {subprocess.py:92} INFO -   File "/usr/local/lib/python3.10/site-packages/google_auth_oauthlib/__init__.py", line 21, in <module>
[2022-10-31, 12:10:56 PDT] {subprocess.py:92} INFO -     from .interactive import get_user_credentials
[2022-10-31, 12:10:56 PDT] {subprocess.py:92} INFO -   File "/usr/local/lib/python3.10/site-packages/google_auth_oauthlib/interactive.py", line 27, in <module>
[2022-10-31, 12:10:56 PDT] {subprocess.py:92} INFO -     import google_auth_oauthlib.flow
[2022-10-31, 12:10:56 PDT] {subprocess.py:92} INFO -   File "/usr/local/lib/python3.10/site-packages/google_auth_oauthlib/flow.py", line 69, in <module>
[2022-10-31, 12:10:56 PDT] {subprocess.py:92} INFO -     import google_auth_oauthlib.helpers
[2022-10-31, 12:10:56 PDT] {subprocess.py:92} INFO -   File "/usr/local/lib/python3.10/site-packages/google_auth_oauthlib/helpers.py", line 27, in <module>
[2022-10-31, 12:10:56 PDT] {subprocess.py:92} INFO -     from google.auth import external_account_authorized_user
[2022-10-31, 12:10:56 PDT] {subprocess.py:92} INFO - ImportError: cannot import name 'external_account_authorized_user' from 'google.auth' (/usr/local/lib/python3.10/site-packages/google/auth/__init__.py)

To Reproduce Steps to reproduce the behavior:

    import pygsheets
    credentials_filename = 'credentials.json'
    gc = pygsheets.authorize(service_file=credentials_filename)

To Fix downgrade google-auth-oauthlib from 0.6.0 to google-auth-oauthlib==0.5.3

System Information

nithinmurali commented 1 year ago

upgrading google-auth-oauthlib fixed this. Please re-open if not.