我希望能够上传文件在我的硬盘到谷歌驱动器使用计划如下:无法将文件上传到谷歌驱动器
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
gauth = GoogleAuth()
drive = GoogleDrive(gauth)
this_file = 'apple.txt'
this_file.Upload()
但是,我得到了以下错误:
AttributeError: 'str' object has no attribute 'Upload'
我该如何上传?
this_file是一个字符串。不知道你如何使用这个api,但是你在复制什么样的例子? – weston 2014-08-28 23:38:11
http://pythonhosted.org/PyDrive/quickstart.html#creating-and-updating-file – Taylor 2014-08-29 03:55:29