我试图通过 gspread 打开谷歌电子表格,但我的代码失败并出现错误:
Traceback (most recent call last):
File "/home/memcpy/.local/lib/python3.6/site-packages/google/oauth2/_client.py", line 156, in jwt_grant
access_token = response_data["access_token"]
KeyError: 'access_token'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "email_sender.py", line 20, in <module>
fetch_users()
File "email_sender.py", line 16, in fetch_users
sheet = client.open('some')
some more tracebacks....
File "/home/memcpy/.local/lib/python3.6/site-packages/google/auth/transport/requests.py", line 444, in request
self.credentials.before_request(auth_request, method, url, request_headers)
File "/home/memcpy/.local/lib/python3.6/site-packages/google/auth/credentials.py", line 133, in before_request
self.refresh(request)
File "/home/memcpy/.local/lib/python3.6/site-packages/google/oauth2/service_account.py", line 359, in refresh
access_token, expiry, _ …Run Code Online (Sandbox Code Playgroud)