如何在生成OpenAPI配置文件时修复打包问题?

时间:2016-12-14 14:35:52

标签: python-2.7 google-app-engine virtualenv google-cloud-endpoints

我正在研究App Engine上的Cloud Quickstart for Cloud Endpoints Frameworks。我尝试通过调用端点工具生成OpenAPI配置文件并得到此错误:

python lib/endpoints/endpointscfg.py get_swagger_spec main.EchoApi --hostname echo.endpoints.[YOUR-PROJECT-ID].cloud.goog


Traceback (most recent call last):
File "lib/endpoints/endpointscfg.py", line 59, in <module>
import _endpointscfg_setup  # pylint: disable=unused-import
File "/Users/myName/lab/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints/_endpointscfg_setup.py", line 98, in <module>
_SetupPaths()
File "/Users/myName/lab/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints/_endpointscfg_setup.py", line 94, in _SetupPaths
from google.appengine.ext import vendor
ImportError: No module named appengine.ext

我的理解是,这是某种包装问题?这是在这里讨论的问题,但我仍然被卡住:Error running endpointscfg.py get_swagger_spec。任何帮助将非常感激。

1 个答案:

答案 0 :(得分:1)

结果证明我的系统变量路径存在问题。具体来说,我补充说:

ENDPOINTS_GAE_SDK =“google_appengine的路径”