Google发现服务发送的Gmail发现错误响应

我们正在使用https://github.com/googleapis/google-api-python-client连接到同时处理发现的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是否可能正在尝试某些内容而偶尔发生这种情况?

iCMS 回答:Google发现服务发送的Gmail发现错误响应

缓存无效可解决此问题(意味着Python直接获取文件的副本,而不使用缓存)这一事实很可能表明缓存文档中发生了损坏。似乎与它在文件系统中的存储方式有关。

如果发现文件缓存被完全禁用,您能否重现该问题?

本文链接:https://www.f2er.com/1947153.html

大家都在问