Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

colab TypeError: GoogleAuth.LocalWebserverAuth() takes from 1 to 3 positional arguments but 5 were given

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

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

評価

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

調査の方向性

まず、示されている LocalWebserverAuth 呼び出しを PyDrive2 1.19.0 で再現し、次に 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: jgwak@dreamylab.com
License: Apache License 2.0
Location: /usr/local/lib/python3.10/dist-packages
Requires: google-api-python-client, oauth2client, pyOpenSSL, PyYAML

主要言語
Python
スター
670
フォーク
75
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

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

iterative/PyDrive2 のほかの issue

iterative/PyDrive2 の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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