colab TypeError: GoogleAuth.LocalWebserverAuth() takes from 1 to 3 positional arguments but 5 were given
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 25/100
- Issue 类型
- 缺陷
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- python
- 领域
- api, authentication
调研方向
先使用 PyDrive2 1.19.0 复现所示的 LocalWebserverAuth 调用,然后检查 pydrive2/auth.py 以及回溯中提到的 Google Colab 包装器 _pydrive2.py。将受支持的方法签名与通过包装器传递的参数进行比较。在解释或修正参数不匹配问题并记录受支持的用法后,即可完成。
由索引模型根据 Issue 内容生成。
描述
I don't understand this error I'm getting on a local google colab docker runtime.
I've checked the code and LocalWebserverAuth takes 4 parameters??
TypeError Traceback (most recent call last)
[<ipython-input-37-7bae651e2bc5>](https://localhost:8080/#) in <cell line: 9>()
7 gauth = GoogleAuth(settings_file='settings.yaml')
8 #gauth.credentials = GoogleCredentials.get_application_default()
----> 9 gauth.LocalWebserverAuth('localhost', [8090], False, '172.17.0.2')
10 #gauth.CommandLineAuth() # requires urn:ietf:wg:oauth:2.0:oob, no longer supported
11 drive = GoogleDrive(gauth)
1 frames
[/usr/local/lib/python3.10/dist-packages/google/colab/_import_hooks/_pydrive2.py](https://localhost:8080/#) in PatchedLocalWebServerAuth(self, *args, **kwargs)
59 self.credentials.refresh(httplib2.Http())
60 return
---> 61 return orig_local_webserver_auth(self, *args, **kwargs)
62
63 pydrive_auth_module.GoogleAuth.LocalWebserverAuth = (
[/usr/local/lib/python3.10/dist-packages/pydrive2/auth.py](https://localhost:8080/#) in _decorated(self, *args, **kwargs)
123 self.LoadCredentials()
124 if self.flow is None:
--> 125 self.GetFlow()
126 if self.credentials is None:
127 code = decoratee(self, *args, **kwargs)
TypeError: GoogleAuth.LocalWebserverAuth() takes from 1 to 3 positional arguments but 5 were given
Info:
Name: PyDrive2
Version: 1.19.0
Summary: Google Drive API made easy. Maintained fork of PyDrive.
Home-page: https://github.com/iterative/PyDrive2
Author: JunYoung Gwak
Author-email: [email protected]
License: Apache License 2.0
Location: /usr/local/lib/python3.10/dist-packages
Requires: google-api-python-client, oauth2client, pyOpenSSL, PyYAML
- 主要语言
- 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
-
难度 2/5 1-3 小时 新手友好度 72/100
-
EvaluationSuite.run fails with default args_for_task and mutates supplied kwargs可能已有人在做 @ktz03 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
huggingface/evaluate#825 ·
维护者通常 1 天内回复
-
dependencies feature github_actions good first issue
难度 2/5 1-3 小时 新手友好度 62/100
wemake-services/wemake-django-template#3149 ·
维护者通常 1 天内回复
-
upstream update
难度 2/5 1-3 小时 新手友好度 65/100
conan-io/conan-center-index#31142 ·
维护者通常 1 天内回复
-
area:core bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复