我正在开发一个 python 脚本,该脚本将使用 Google Drive API v3 管理共享驱动器上的文件。但是,当我尝试下载或替换该文件时,出现以下错误:
An error occurred: <HttpError 404 when requesting https://www.googleapis.com/upload/drive/v3/files/1HhCxshcR17I4rM0gtBIvHzEH_jzd7nV2?alt=json&uploadType=multipart returned "File not found: 1HhCxshcR17I4rM0gtBIvHzEH_jzd7nV2.">
Run Code Online (Sandbox Code Playgroud)
这是我的代码
def update_file(service, file_id, new_title, new_description, new_mime_type,
new_filename):
"""Update an existing file's metadata and content.
Args:
service: Drive API service instance.
file_id: ID of the file to update.
new_title: New title for the file.
new_description: New description for the file.
new_mime_type: New MIME type for the file.
new_filename: Filename of the new content to upload.
new_revision: Whether or not …Run Code Online (Sandbox Code Playgroud) python python-3.x google-drive-api google-drive-shared-drive