holdenweb / holdenweb/python-training

Fix google authentication error

Đang mở
#5 2 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
1
Fork
2
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.