python - python(应用程序引擎)的端点不会生成发现文档

标签 python google-app-engine google-cloud-sdk

升级 gcloud 后,我突然收到此错误:

endpointscfg.py get_discovery_doc -f rest
service_backend.main.PersonService Traceback (most recent call last): 
File
"/Users/dgaedcke/gcloud_tools/google-cloud-sdk/platform/google_appengine/endpointscfg.py",
line 133, in <module>
    run_file(__file__, globals())   File "/Users/dgaedcke/gcloud_tools/google-cloud-sdk/platform/google_appengine/endpointscfg.py",
line 129, in run_file
    execfile(_PATHS.script_file(script_name), globals_)   File "/Users/dgaedcke/gcloud_tools/google-cloud-sdk/platform/google_appengine/google/appengine/tools/endpointscfg.py",
line 69, in <module>
    from google.appengine.tools.devappserver2 import api_server   File "/Users/dgaedcke/gcloud_tools/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/api_server.py",
line 86, in <module>
    from google.appengine.tools.devappserver2 import cli_parser   File "/Users/dgaedcke/gcloud_tools/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/cli_parser.py",
line 40, in <module>
    from google.appengine.tools.devappserver2 import runtime_factories   File
"/Users/dgaedcke/gcloud_tools/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/runtime_factories.py", line 21, in <module>
    from google.appengine.tools.devappserver2 import custom_runtime   File
"/Users/dgaedcke/gcloud_tools/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/custom_runtime.py",
line 26, in <module>
    from google.appengine.tools.devappserver2 import http_runtime   File
"/Users/dgaedcke/gcloud_tools/google-cloud-sdk/platform/google_appengine/google/appengine/tools/devappserver2/http_runtime.py",
line 53, in <module>
    import portpicker ImportError: No module named portpicker

谁能告诉我如何解决这个问题吗?

最佳答案

所以我能够重现这个错误。所以我在这里提交了一个错误并提供了可能的解决方法:issue 63260172 .

要在分类时解决该问题,您应该全局安装 portpicker:

sudo pip install portpicker

或自制程序特定修复:

pip install --user --install-option=“--prefix=” portpicker

关于python - python(应用程序引擎)的端点不会生成发现文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44856487/

相关文章:

python - 另一个 StructuredProperty 中的 StructuredProperty。如何?

google-cloud-sdk - 配置升级 google-cloud-sdk 失败

python - Pandas合并表: only distinct Ids from second table

python - 从 Python 中的集合中随机选择元素

python - Django 计算字段不会出现在迁移中

python - 尝试 google voice api 但在客户端模块上收到 ImportError

python - Mac gcloud 安装 ImportError : No module named __future__

python - pip 不会安装包

java - UserService.getCurrentUser() 返回 null

google-app-engine - Google App Engine 和后端 : how to configure it on development server?