1

我正在尝试为我的端点应用程序构建发现文档,但出现以下错误:

pc@pc:~/backend$ endpointscfg.py get_discovery_doc [PROJECT_NAME]
Traceback (most recent call last):
  File "/home/pc/Downloads/google-cloud-sdk/bin/endpointscfg.py", line 10, in <module>
    import bootstrapping.bootstrapping as bootstrapping
  File "/home/pc/Downloads/google-cloud-sdk/bin/bootstrapping/bootstrapping.py", line 22, in <module>
    from googlecloudsdk.core.credentials import store as c_store
  File "/home/pc/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/credentials/store.py", line 30, in <module>
    from googlecloudsdk.core.credentials import creds
  File "/home/pc/Downloads/google-cloud-sdk/lib/googlecloudsdk/core/credentials/creds.py", line 32, in <module>
    from oauth2client.contrib import multistore_file
ImportError: cannot import name multistore_file

oauth2client 的版本是4.1.0. 似乎该文件oauth2client.contrib.multistore_file已被弃用,然后从 oauth2client ( https://github.com/google/oauth2client/pull/589 ) 中删除,所以我认为我的谷歌客户端库已过时,但我已经运行gcloud components update app-engine-python并且我仍然得到同样的错误。

难道我做错了什么?

4

1 回答 1

3

恐怕解决方案是您必须使用旧版本的 oauth2client。如果您确保您拥有最新 ( 1.1.2) 版本的 google-endpoints-api-management,那么您将需要安装 google-apitools 版本0.5.11和 oauth2client 版本3.0.0

于 2017-05-30T15:16:28.210 回答