Closed realgsong closed 5 years ago
Unfortunately, that example is obsolete and should not be used. The correct examples are in https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/appengine/standard/endpoints-frameworks-v2
I got the same error with endpoints-frameworks-v2 sample. @inklesspen would you reopen this issue?
Traceback (most recent call last):
File "./lib/endpoints/endpointscfg.py", line 31, in <module>
main(sys.argv)
File "/home/ksbae/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints/_endpointscfg_impl.py", line 617, in main
args.callback(args)
File "/home/ksbae/python-docs-samples/appengine/standard/endpoints-frameworks-v2/echo/lib/endpoints/_endpointscfg_impl.py", line 465, in _GenOpenApiSpecCallback
x_google_api_name=args.x_google_api_name)
AttributeError: 'Namespace' object has no attribute 'x_google_api_name'
get_swagger_spec is a legacy command, replaced by get_openapi_spec. While I investigate why get_swagger_spec doesn't behave correctly, use: python ./lib/endpoints/endpointscfg.py get_openapi_spec main.EchoApi
The full up-to-date instructions for Endpoints Frameworks are here: https://cloud.google.com/endpoints/docs/frameworks/python/get-started-frameworks-python
Repro
Error
Please tell me if I'm missing something.