-
Notifications
You must be signed in to change notification settings - Fork 133
generate() got an unexpected keyword argument 'spec' #62
Comments
你好 能够告诉我怎么运行吗 这个是flask 框架 还是什么呢?wo没再怎么看懂,node。js 没接触过,,可以告诉吗,谢谢 |
@Clqsin45 你好 这个问题持续未能复现,我们仍在继续跟进 |
|
./control.sh start 启动同样遇到这个问题,MacOS, python 3.6.4,nodejs v10.14.1,npm 6.4.1: Installing collected packages: PyYAML, dpath, swagger-py-codegen 解决了:click的版本修改,在control.sh中103行source ${G_VENV_DIR}/bin/activate后添加pip install click==6.7 |
@wonder2025 感谢你的帮助,请问你愿意发起 pull request 来合并修改吗 |
I have similar error like "Traceback (most recent call last): |
@wjdhuster2018 |
installed click==6.7 as @wonder2025 said but not resolved yet. |
The problem seems to be the API of swagger package has changed.
|
@wjdhuster2018 We have the same error,Please uninstall the swagger_py_codegen and reinstall it with version--0.40,it solved my problem |
I'm sorry that I haven't found a graceful solution for the request/click/swagger_py_codegen problem in the past time. I'm going to submit the generated code to the repository later. |
error message
deploy api... Collecting swagger-py-codegen==0.2.9 Collecting dpath (from swagger-py-codegen==0.2.9) Requirement already satisfied: six in ./venv/lib/python3.6/site-packages (from swagger-py-codegen==0.2.9) (1.11.0) Collecting PyYAML (from swagger-py-codegen==0.2.9) Requirement already satisfied: click in ./venv/lib/python3.6/site-packages (from swagger-py-codegen==0.2.9) (7.0) Requirement already satisfied: jinja2 in ./venv/lib/python3.6/site-packages (from swagger-py-codegen==0.2.9) (2.10) Requirement already satisfied: MarkupSafe>=0.23 in ./venv/lib/python3.6/site-packages (from jinja2->swagger-py-codegen==0.2.9) (1.0) Installing collected packages: dpath, PyYAML, swagger-py-codegen Successfully installed PyYAML-3.13 dpath-1.4.2 swagger-py-codegen-0.2.9 Traceback (most recent call last): File "xxx/Curve/venv/bin/swagger_py_codegen", line 11, in <module> sys.exit(generate()) File "xxx/Curve/venv/lib/python3.6/site-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "xxx/Curve/venv/lib/python3.6/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "xxx/Curve/venv/lib/python3.6/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "xxx/Curve/venv/lib/python3.6/site-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) TypeError: generate() got an unexpected keyword argument 'spec'
env:
python 3.6 / 2.7 (i have tried both of them)
ubuntu 18.04
node.js 10.13.0 (includes npm 6.4.1)
seems it occured when executed
swagger_py_codegen --ui --spec -s doc/web_api.yaml api -p curve
Thanks a lot !
The text was updated successfully, but these errors were encountered: