Erro ao executar endpointscfg.py get_swagger_spec
Estou tentando criar um projeto usando o Google Cloud Endpoints, seguindo este guia:Início rápido para estruturas de pontos de extremidade de nuvem no App Engine.
Estou preso na etapa de gerar o arquivo de configuração OpenAPI, onde preciso executar este comando:
Tentativa Um
$ lib/endpoints/endpointscfg.py get_swagger_spec main.EchoApi --hostname your-service.appspot.com
Eu recebo este erro:
-bash: lib/endpoints/endpointscfg.py: Permission denied
Tentativa Dois
Eu tentei o mesmo comando comsudo
, que retornou este erro:
sudo: lib/endpoints/endpointscfg.py: command not found
Tentativa três
Eu tenteicd lib/endpoints
para executar o comando na mesma pasta queendpointscfg.py
Arquivo:
$ cd lib/endpoints
$ endpointscfg.py get_swagger_spec main.EchoApi --hostname your-service.appspot.com
usage: /Users/myName/google-cloud-sdk/platform/google_appengine/endpointscfg.py
[-h] {get_client_lib, get_discovery_doc} ...
/Users/myName/google-cloud-sdk/platform/google_appengine/endpointscfg.py: error: argument {get_client_lib, get_discovery_doc}: invalid choice: 'get_swagger_spec' (choose from 'get_client_lib', 'get_discovery_doc')
Tentativa quatro
A execução com python retorna um tipo diferente de problema:
$ python lib/endpoints/endpointscfg.py get_swagger_spec main.EchoApi --hostname your-service.appspot.com
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