quickstart.py credentials.json not found for read
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Facilidade para iniciantes
- 30/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Estagnada
- Stack de tecnologia
- python
- Domínio
- authentication
Direção de pesquisa
The failure comes from the InstalledAppFlow.from_client_secrets_file call in main() of gmail/quickstart/quickstart.py, which opens credentials.json relative to the current working directory. Reproduce by running the script from a different directory than the one holding the file, then decide whether the sample should resolve the path against the script's location or report a clearer error. Done means the script either finds the credentials file or fails with an actionable message, and the README or quickstart text says where the file must go.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- install requirements through requirements.txt
- run the script
Specifications
- Python version (
python --version) - 3.9.6
- OS (Mac/Linux/Windows)
- Arch rolling[5.10.48-1-lts]
- Linguagem predominante
- Python
- Estrelas
- 1.4k
- Forks
- 917
- Merge médio
- 3min
- PRs com merge (30d)
- 1
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de googleworkspace/python-samples
-
ايقاف البحث الأمنTalvez livre de novo @sqrrrl assumiu há 400 dias e não há nenhum pull request aberto. Aberta
googleworkspace/python-samples#2434 · 1 responsável ·
-
Slow Uploads using Google Drive API with PythonTalvez livre de novo @sqrrrl assumiu há 740 dias e não há nenhum pull request aberto. Aberta
googleworkspace/python-samples#1852 · 1 comentário · 1 responsável ·
-
403 error from google after a few successful runs of my codeTalvez livre de novo @vinay-google assumiu há 912 dias e não há nenhum pull request aberto. Aberta
googleworkspace/python-samples#1424 · 1 responsável ·
-
How to see the progress of files which is getting uploadedTalvez livre de novo @vinay-google assumiu há 928 dias e não há nenhum pull request aberto. Aberta
googleworkspace/python-samples#1404 · 1 responsável ·
-
Phyton SamplesTalvez livre de novo @PierrickVoulet assumiu há 975 dias e não há nenhum pull request aberto. Aberta
googleworkspace/python-samples#1279 · 1 responsável ·
Todas as issues de googleworkspace/python-samples
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 2 dias
-
Reference check: findingsAbertaaudit-reference-check
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 1 dia
-
site-bug triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
canonical/paas-charm#407 · 1 comentário ·
Mantenedores costumam responder em até 5 dias