ValueError: Client secrets must be for a web or installed app

Aberta
#212 0 comentários 5 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
25/100
Tipo de issue
Bug
Clareza
Precisa de esclarecimento
Status de atividade
Estagnada
Stack de tecnologia
google-cloud, python
Domínio
api

Direção de pesquisa

The traceback points at InstalledAppFlow.from_client_secrets_file in quick2.py (line 43), which rejects a client secrets file that is not a web or installed app credential. Start by finding the Drive quickstart sample that loads the secrets file, and check which OAuth client type its setup instructions tell users to create. Done means the sample or its README either states the required client type clearly or fails with a readable message for the wrong type.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Expected Behavior

program works, prints list of files in google drive

Actual Behavior

Traceback (most recent call last):
File "/Users/mattf/googledocs-python/./quick2.py", line 65, in
main()
File "/Users/mattf/googledocs-python/./quick2.py", line 43, in main
flow = InstalledAppFlow.from_client_secrets_file(
File "/Users/mattf/googledocs-venv/lib/python3.9/site-packages/google_auth_oauthlib/flow.py", line 206, in from_client_secrets_file
return cls.from_client_config(client_config, scopes=scopes, **kwargs)
File "/Users/mattf/googledocs-venv/lib/python3.9/site-packages/google_auth_oauthlib/flow.py", line 164, in from_client_config
raise ValueError("Client secrets must be for a web or installed app.")
ValueError: Client secrets must be for a web or installed app.

Steps to Reproduce the Problem

  1. Follow the quickstart guide (https://developers.google.com/drive/api/v3/quickstart/python)

Specifications

  • Python version (python --version)
  • OS (Mac/Linux/Windows)
Linguagem predominante
Python
Estrelas
1.4k
Forks
917
Merge médio
3min
PRs com merge (30d)
1

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de googleworkspace/python-samples

Todas as issues de googleworkspace/python-samples

Issues semelhantes

Mais issues de Python

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.