Confirm OAuth OOB and Implement Temporary Workaround
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- google-cloud, python
- 领域
- api, authentication
调研方向
从 pydrive2/files.py lines 512 和 683 中所示调用之前涉及的 OAuth 流程开始,并查看 pydrive2/auth.py line 84 中的装饰器。将该流程与 Google 的 OOB 迁移文档以及所引用的 PyDrive2 pull request 进行比较;确认临时 workaround 的决定,并且受影响的脚本在所述 OAuth 更改下不再失败,即表示完成。
由索引模型根据 Issue 内容生成。
描述
This morning (Sept 12) a PyDrive reliant script of ours failed. The full stacktrace is below. The script ran successfully last week, and there have been no changes to the configuration on our end. I think this is due to Google's impending removal of support for OAuth Out-of-Band flow.
Google's migration docs indicate that users can
Add an ack_oob_shutdown parameter with a value of the enforcement date: 2022-10-03 to your redirect flow request. Example:
ack_oob_shutdown=2022-10-03
The Migrating to Google Auth Library PR is open. If it will not be merged in short order, I suggest implementing the temporary workaround.
Stacktrace
Traceback (most recent call last):
...
File "/Users/.../lib/python3.8/site-packages/pydrive2/files.py", line 512, in Upload
self._FilesInsert(param=param)
File "/Users/.../lib/python3.8/site-packages/pydrive2/auth.py", line 84, in _decorated
return decoratee(self, *args, **kwargs)
File "/Users/.../lib/python3.8/site-packages/pydrive2/files.py", line 683, in _FilesInsert
raise ApiRequestError(error)
pydrive2.files.ApiRequestError: <HttpError 403 when requesting https://www.googleapis.com/drive/v2/files?supportsAllDrives=true&alt=json returned "Access Not Configured. Drive API has not been used in project xxxxx before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=xxxxx then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.". Details: "[{'domain': 'usageLimits', 'reason': 'accessNotConfigured', 'message': 'Access Not Configured. Drive API has not been used in project xxxxx before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=xxxxx then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.', 'extendedHelp': 'https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=xxxxx'}]">
- 主要语言
- Python
- 星标
- 668
- 派生
- 75
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
iterative/PyDrive2 的其他 Issue
-
难度 5/5 一周以上 新手友好度 10/100
-
难度 4/5 3-5 天 新手友好度 45/100
-
难度 5/5 一周以上 新手友好度 35/100
-
难度 2/5 1-3 小时 新手友好度 30/100
-
难度 3/5 1-2 天 新手友好度 35/100
查看 iterative/PyDrive2 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
topoteretes/cognee#5647 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
Sendspin/sendspin-python-cli#291 ·
维护者通常 6 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
awslabs/visual-asset-management-system#414 ·
维护者通常 1 天内回复
-
bug v1 v2
难度 2/5 1-3 小时 新手友好度 75/100
modelcontextprotocol/python-sdk#3670 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
aicell-lab/bioengine#232 ·
维护者通常 1 天内回复