生成 OpenAPI 配置文件时如何解决打包问题?
How do I fix packaging issue when generating OpenAPI configuration file?
我正在学习 App Engine 上的 Python 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
我的理解是这是某种包装问题?这是这里讨论的问题,但我仍然卡住了:。任何帮助将非常感激。
原来是我系统变量路径的问题。具体我补充说:
ENDPOINTS_GAE_SDK="path to google_appengine"
我正在学习 App Engine 上的 Python 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
我的理解是这是某种包装问题?这是这里讨论的问题,但我仍然卡住了:
原来是我系统变量路径的问题。具体我补充说:
ENDPOINTS_GAE_SDK="path to google_appengine"