最近在使用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.
你怎么解决这个问题?在
对于PyDrive,您需要创建和使用一个具有更高限制的独特的OAuth客户机客户机ID。说明如下:
https://pythonhosted.org/PyDrive/quickstart.html#authentication
但是,使用内置的Drive-FUSE客户端与Drive交互可能更简单。要使用它,请使用以下代码段执行代码单元:
Details here。在
相关问题 更多 >
编程相关推荐