Error generating Swagger server (Python Flask) from Swagger editor - Go语言中文社区

Error generating Swagger server (Python Flask) from Swagger editor


http://stackoverflow.com/questions/36416679/error-generating-swagger-server-python-flask-from-swagger-editor

 

I've used the Swagger Editor to manually generate my Swagger spec file and generated the files for a Python Flask server. Following the README I installed connexion, but when I run python app.py I get the error:  ValueError: need more than 1 value to unpack. Any ideas?

Full stack trace below:

No handlers could be found for logger "connexion.api"
Traceback (most recent call last):
  File "app.py", line 5, in <module>
    app.add_api('swagger.yaml')
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/connexion/app.py", line 144, in add_api
    debug=self.debug)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/connexion/api.py", line 127, in __init__
    self.add_paths()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/connexion/api.py", line 198, in add_paths
    six.reraise(*sys.exc_info())
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/connexion/api.py", line 187, in add_paths
    self.add_operation(method, path, endpoint, path_parameters)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/connexion/api.py", line 160, in add_operation
    resolver=self.resolver)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/connexion/operation.py", line 168, in __init__
    resolution = resolver.resolve(self)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/connexion/resolver.py", line 50, in resolve
    return Resolution(self.resolve_function_from_operation_id(operation_id), operation_id)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/connexion/resolver.py", line 71, in resolve_function_from_operation_id
    return self.function_resolver(operation_id)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/connexion/utils.py", line 106, in get_function_from_name
    module_name, attr_path1 = module_name.rsplit('.', 1)
ValueError: need more than 1 value to unpack
share|improve this question
 
1                                                                                  
Please open a ticket via github.com/swagger-api/swagger-codegen/issues for tracking.                     – wing328                 Apr 6 at 4:45                                                                            

转载于:https://www.cnblogs.com/kungfupanda/p/5522137.html

版权声明:本文来源CSDN,感谢博主原创文章,遵循 CC 4.0 by-sa 版权协议,转载请附上原文出处链接和本声明。
原文链接:https://blog.csdn.net/weixin_34038293/article/details/94493646
站方申明:本站部分内容来自社区用户分享,若涉及侵权,请联系站方删除。

0 条评论

请先 登录 后评论

官方社群

GO教程

猜你喜欢