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

オープン
#212 コメント 0 件 リアクション 5 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
google-cloud, python
領域
api

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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)
主要言語
Python
スター
1.4k
フォーク
917
平均マージ
3分
マージ済み PR(30日)
1

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

googleworkspace/python-samples のほかの issue

googleworkspace/python-samples の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。