I am trying to create a project using Google Cloud Endpoints by following this guide: Quick start for cloud endpoint platforms in App Engine .
I was stuck at the stage of creating the OpenAPI configuration file, where I need to run this command:
Attempt 1
$ lib/endpoints/endpointscfg.py get_swagger_spec main.EchoApi
I get this error:
-bash: lib/endpoints/endpointscfg.py: Permission denied
Attempt Two
I tried the same command with sudo that returned this error:
sudo: lib/endpoints/endpointscfg.py: command not found
Attempt Three
I tried 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 another problem:
$ 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
source share