I am trying to build a project using Google Cloud Endpoints, following this guide: Quickstart for Cloud Endpoints Frameworks on App Engine.
I am stuck at the step of generating the OpenAPI configuration file, where I need to run this command:
Attempt One
$ lib/endpoints/endpointscfg.py get_swagger_spec main.EchoApi --hostname your-service.appspot.com
I get this error:
-bash: lib/endpoints/endpointscfg.py: Permission denied
Attempt Two
I have tried the same command with sudo
, which returned this error:
sudo: lib/endpoints/endpointscfg.py: command not found
Attempt Three
I have tried to cd lib/endpoints
to run the command from the same folder as endpointscfg.py
file:
$ 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')
Attempt Four
Running it with python returns a different kind of issue:
$ 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