最近在使用Google Collab中的pydrive时如下所示
!pip install -U -q PyDrive
import os
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
from google.colab import auth
from oauth2client.client import GoogleCredentials
# 1. Authenticate and create the PyDrive client.
auth.authenticate_user()
gauth = GoogleAuth()
gauth.credentials = GoogleCredentials.get_application_default()
drive = GoogleDrive(gauth)我输入了代码,但在那之后,我在尝试创建文件时开始获取ApiRequestError。在响应中,我看到了Daily Limit for Unauthenticated Use Exceeded. Continued use requires signup.
你怎么解决这个问题呢?
发布于 2019-04-08 10:30:55
对于PyDrive,您需要创建并使用一个具有更高限制的不同OAuth客户机ID。操作步骤如下:
https://pythonhosted.org/PyDrive/quickstart.html#authentication
但是,使用内置的Drive FUSE客户端与Drive进行交互可能会更简单。要使用该功能,请使用以下代码片段执行代码单元:
from google.colab import drive
drive.mount('/content/drive')https://stackoverflow.com/questions/55557298
复制相似问题