holdenweb / holdenweb/python-training

Fix google authentication error

Ouverte
#5 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
1
Forks
2
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.