guokr / swagger-py-codegen

a Python web framework generator supports Flask, Tornado, Falcon, Sanic
554 stars 154 forks source link

Type Error: Unexpected Keyword Argument 'swagger' #129

Closed dagrooms52 closed 6 years ago

dagrooms52 commented 6 years ago

When using swagger_py_codegen version 0.3.4, I get the following error:

TypeError: generate() got an unexpected keyword argument 'swagger'

I can reproduce this using the test swagger hosted in this repository:

https://github.com/guokr/swagger-py-codegen/blob/master/tests/testing.yml

Below is the full stack trace

swagger_py_codegen --swagger-doc swagger.yaml example-app
Traceback (most recent call last):
  File "/Users/dgrooms/.pyenv/versions/3.6.5/bin/swagger_py_codegen", line 11, in <module>
    sys.exit(generate())
  File "/Users/dgrooms/.pyenv/versions/3.6.5/lib/python3.6/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/Users/dgrooms/.pyenv/versions/3.6.5/lib/python3.6/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/Users/dgrooms/.pyenv/versions/3.6.5/lib/python3.6/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/dgrooms/.pyenv/versions/3.6.5/lib/python3.6/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
TypeError: generate() got an unexpected keyword argument 'swagger'
gusibi commented 6 years ago

Fixed, please upgrade to 0.3.5