python-samples icon indicating copy to clipboard operation
python-samples copied to clipboard

quickstart.py credentials.json not found for read

Open stephenboston opened this issue 3 years ago • 2 comments

Expected Behavior

As described in https://developers.google.com/gmail/api/quickstart/python

Actual Behavior

File "/hd2/projects/temp/python-samples/gmail/quickstart/quickstart.py", line 62, in main() File "/hd2/projects/temp/python-samples/gmail/quickstart/quickstart.py", line 41, in main flow = InstalledAppFlow.from_client_secrets_file( File "/home/stephen/.local/lib/python3.9/site-packages/google_auth_oauthlib/flow.py", line 180, in from_client_secrets_file with open(client_secrets_file, 'r') as json_file: FileNotFoundError: [Errno 2] No such file or directory: 'credentials.json'

Steps to Reproduce the Problem

1.Download these python samples

  1. install requirements through requirements.txt
  2. run the script

Specifications

  • Python version (python --version)
  • 3.9.6
  • OS (Mac/Linux/Windows)
  • Arch rolling[5.10.48-1-lts]

stephenboston avatar Jul 11 '21 13:07 stephenboston