quickstart.py: Client secrets must be for a web or installed app.
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 半天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- python
调研方向
The traceback points to the from_client_secrets_file call near line 31 of the quickstart script (named google_docs.py in the report), which loads credentials.json through google_auth_oauthlib's InstalledAppFlow. Start there and check whether the sample expects an OAuth client file, since a service account key is rejected. Done means either the sample accepts a service account key or the README clearly says which credential type to download. The thread has been silent for about three years, so confirm with a maintainer before starting.
由索引模型根据 Issue 内容生成。
描述
Steps to Reproduce the Problem
- Create Service account and download JSON file with credentials
- Run quickstart.py
Expected Behavior
The script works just fine, everything works from the box.
Actual Behavior
The traceback:
Traceback (most recent call last):
File "google_docs.py", line 46, in <module>
main()
File "google_docs.py", line 31, in main
'credentials.json', SCOPES)
File "/usr/local/lib/python3.7/site-packages/google_auth_oauthlib/flow.py", line 199, in from_client_secrets_file
return cls.from_client_config(client_config, scopes=scopes, **kwargs)
File "/usr/local/lib/python3.7/site-packages/google_auth_oauthlib/flow.py", line 159, in from_client_config
'Client secrets must be for a web or installed app.')
ValueError: Client secrets must be for a web or installed app.
Specifications
- Python version
Python 3.7.4 - OS: Mac
Workaround:
The workaround I've found for this issue:
https://stackoverflow.com/a/61892378/7856072
(this workaround proves that credentials.json is the correct file for authorization and account has all necessary rights).
- 主要语言
- Python
- 星标
- 1.4k
- 派生
- 917
- 平均合并
- 3 分钟
- 30 天内合并 PR
- 1
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
googleworkspace/python-samples 的其他 Issue
-
ايقاف البحث الأمن可能重新可做 @sqrrrl 于 400 天前认领,目前没有进行中的 PR。 未关闭
googleworkspace/python-samples#2434 · 已指派 1 人 ·
-
Slow Uploads using Google Drive API with Python可能重新可做 @sqrrrl 于 740 天前认领,目前没有进行中的 PR。 未关闭
googleworkspace/python-samples#1852 · 1 条评论 · 已指派 1 人 ·
-
403 error from google after a few successful runs of my code可能重新可做 @vinay-google 于 912 天前认领,目前没有进行中的 PR。 未关闭
googleworkspace/python-samples#1424 · 已指派 1 人 ·
-
How to see the progress of files which is getting uploaded可能重新可做 @vinay-google 于 928 天前认领,目前没有进行中的 PR。 未关闭
googleworkspace/python-samples#1404 · 已指派 1 人 ·
-
Phyton Samples可能重新可做 @PierrickVoulet 于 975 天前认领,目前没有进行中的 PR。 未关闭
googleworkspace/python-samples#1279 · 已指派 1 人 ·
查看 googleworkspace/python-samples 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 88/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
readthedocs/readthedocs-builder#73 ·
维护者通常 1 天内回复
-
area: ci bug good first issue help wanted
难度 2/5 1-3 小时 新手友好度 84/100
hffgzktbcc-blip/ounce-core#484 · 1 条评论 ·
维护者通常 1 天内回复
-
bug documentation
难度 2/5 1-3 小时 新手友好度 73/100
vllm-project/vllm-torchtpu#3395 ·
维护者通常 1 天内回复
-
Hermes plugin: MITM-domain discovery misses the model: block (provider/base_url nested under model:) — traffic blind-tunnels silently, zero compression可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭bug
难度 2/5 1-3 小时 新手友好度 66/100
ranxianglei/billion-context#7063 ·
维护者通常 1 天内回复