holdenweb / holdenweb/python-training

Fix google authentication error

Abierto
#5 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
1
Forks
2
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

2 of the tests are failing due to an google authentication error.

Please see the error logs below!

```
FAILED tests/test_load_data.py::test_spreadsheet_load - FileNotFoundError: [Errno 2] No such file or directory: '/Users/chloe/.credentials.json'
FAILED tests/test_sheets.py::test_service - FileNotFoundError: [Errno 2] No such file or directory: '/Users/chloe/.credentials.json'
```

```
src/transformers/sheets.py:57: in build_service
creds = authenticate()
src/transformers/sheets.py:48: in authenticate
flow = InstalledAppFlow.from_client_secrets_file(CREDENTIALS_FILE, SCOPES)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

cls = , client_secrets_file = '/Users/chloe/.credentials.json'
scopes = ['https://www.googleapis.com/auth/documents', 'https://www.googleapis.com/auth/spreadsheets.readonly'], kwargs = {}

@classmethod
def from_client_secrets_file(cls, client_secrets_file, scopes, **kwargs):
"""Creates a :class:`Flow` instance from a Google client secrets file.

Args:
client_secrets_file (str): The path to the client secrets .json
file.
scopes (Sequence[str]): The list of scopes to request during the
flow.
kwargs: Any additional parameters passed to
:class:`requests_oauthlib.OAuth2Session`

Returns:
Flow: The constructed Flow instance.
"""
> with open(client_secrets_file, "r") as json_file:
E FileNotFoundError: [Errno 2] No such file or directory: '/Users/chloe/.credentials.json'

/Users/chloe/Library/Caches/pypoetry/virtualenvs/transformers-0uvkL1OC-py3.9/lib/python3.9/site-packages/google_auth_oauthlib/flow.py:204: FileNotFoundError
============================================================ short test summary info =============================================================
FAILED tests/test_load_data.py::test_spreadsheet_load - FileNotFoundError: [Errno 2] No such file or directory: '/Users/chloe/.credentials.json'
FAILED tests/test_sheets.py::test_service - FileNotFoundError: [Errno 2] No such file or directory: '/Users/chloe/.credentials.json'
========================================================== 2 failed, 8 passed in 0.70s ===========================================================
make: *** [test] Error 1
```

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.