Я пытаюсь открыть таблицу Google через 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
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, _ = _client.jwt_grant(request, self._token_uri, assertion)
File "/home/memcpy/.local/lib/python3.6/site-packages/google/oauth2/_client.py", line 159, in jwt_grant
six.raise_from(new_exc, caught_exc)
File "", line 3, in raise_from
google.auth.exceptions.RefreshError: ('No access token in response.', {'id_token': 'there was some token so I hided it'})
Я пытался погуглить ошибку, но ничего о ней не нашел. Это мой код:
import gspread
from google.oauth2.service_account import Credentials
scope = [
'https://googleapis.com/auth/drive',
'https://googleapis.com/auth/spreadsheets'
]
creds = Credentials.from_service_account_file('creds.json', scopes=scope)
client = gspread.authorize(creds)
sheet = client.open('some')
Подробнее здесь: https://stackoverflow.com/questions/634 ... -spreadshe
Google.oauth2 Ошибка «Нет токена доступа в ответе» при попытке открыть электронную таблицу ⇐ Python
Программы на Python
1731335607
Anonymous
Я пытаюсь открыть таблицу Google через 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
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, _ = _client.jwt_grant(request, self._token_uri, assertion)
File "/home/memcpy/.local/lib/python3.6/site-packages/google/oauth2/_client.py", line 159, in jwt_grant
six.raise_from(new_exc, caught_exc)
File "", line 3, in raise_from
google.auth.exceptions.RefreshError: ('No access token in response.', {'id_token': 'there was some token so I hided it'})
Я пытался погуглить ошибку, но ничего о ней не нашел. Это мой код:
import gspread
from google.oauth2.service_account import Credentials
scope = [
'https://googleapis.com/auth/drive',
'https://googleapis.com/auth/spreadsheets'
]
creds = Credentials.from_service_account_file('creds.json', scopes=scope)
client = gspread.authorize(creds)
sheet = client.open('some')
Подробнее здесь: [url]https://stackoverflow.com/questions/63418603/google-oauth2-no-access-token-in-response-error-while-trying-to-open-spreadshe[/url]
Ответить
1 сообщение
• Страница 1 из 1
Перейти
- Кемерово-IT
- ↳ Javascript
- ↳ C#
- ↳ JAVA
- ↳ Elasticsearch aggregation
- ↳ Python
- ↳ Php
- ↳ Android
- ↳ Html
- ↳ Jquery
- ↳ C++
- ↳ IOS
- ↳ CSS
- ↳ Excel
- ↳ Linux
- ↳ Apache
- ↳ MySql
- Детский мир
- Для души
- ↳ Музыкальные инструменты даром
- ↳ Печатная продукция даром
- Внешняя красота и здоровье
- ↳ Одежда и обувь для взрослых даром
- ↳ Товары для здоровья
- ↳ Физкультура и спорт
- Техника - даром!
- ↳ Автомобилистам
- ↳ Компьютерная техника
- ↳ Плиты: газовые и электрические
- ↳ Холодильники
- ↳ Стиральные машины
- ↳ Телевизоры
- ↳ Телефоны, смартфоны, плашеты
- ↳ Швейные машинки
- ↳ Прочая электроника и техника
- ↳ Фототехника
- Ремонт и интерьер
- ↳ Стройматериалы, инструмент
- ↳ Мебель и предметы интерьера даром
- ↳ Cантехника
- Другие темы
- ↳ Разное даром
- ↳ Давай меняться!
- ↳ Отдам\возьму за копеечку
- ↳ Работа и подработка в Кемерове
- ↳ Давай с тобой поговорим...
Мобильная версия