【发布时间】:2020-07-13 10:00:57
【问题描述】:
我们使用https://github.com/googleapis/google-api-python-client 连接到Gmail,该Gmail 也处理发现。今天我们注意到 API 没有在其中一台服务器中通过,并发现发现缓存(缓存在 google-api-python-client-discovery-doc.cache 中)无效且 JSON 不可解析。
看起来发现模式构建不正确或在传输过程中丢失了某些东西(后者如何发生,我不知道) 我在此处添加了部分 JSON,您可以在此处的第 7 行看到无效的 JSON。
"quotaUser": {
"type": "string",
"description": "Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.",
"location": "query"
},
"upload_protocol": {
"description": "Upload protocol for media (e.g. \"raw\", \"eapis.com/auth/gmail.settings.sharing": {
"description": "Manage your sensitive mail settings, including who can manage your mail"
},
"https://www.googleapis.com/auth/gmail.modify": {
"description": "View and modify but not delete your email"
},
"https://www.googleapis.com/auth/gmail.metadata": {
"description": "View your email message metadata such as labels and headers, but not the email body"
},
"https://www.googleapis.com/auth/gmail.labels": {
"description": "Manage mailbox labels"
},
"https://www.googleapis.com/auth/gmail.addons.current.message.metadata": {
"description": "View your email message metadata when the add-on is running"
},
"https://www.googleapis.com/auth/gmail.insert": {
"description": "Insert mail into your mailbox"
}
}
}
我已在此处附上了有效和无效的完整发现文档:https://drive.google.com/drive/folders/12LWm_EKNeWenJWUeIJA8BRDrXjz27OYO?usp=sharing
请注意,当此缓存失效时,它可以正常工作并且 API 也正常。发生这种情况时格式会略有不同,那么 Gmail 是否有可能正在尝试某些东西并且这种情况偶尔会发生?
【问题讨论】:
-
看起来像一个 gmail 问题 - 我在这里提交了一个错误 - issuetracker.google.com/u/0/issues/161096876
标签: google-api gmail gmail-api service-discovery google-client