You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
swagger-editer generator server python flask based connexion, when i run app.
Expected bahaviour
Traceback (most recent call last):
File "E:\eclipsephp\plugins\org.python.pydev_4.5.4.201601292234\pysrc\pydevd.py", line 1524, in
globals = debugger.run(setup['file'], None, None, is_module)
File "E:\eclipsephp\plugins\org.python.pydev_4.5.4.201601292234\pysrc\pydevd.py", line 931, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "E:\eclipsephp\plugins\org.python.pydev_4.5.4.201601292234\pysrc_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "E:\pworkspace\testrest\examples\python-flask-server\app.py", line 6, in
app.add_api('swagger.yaml', arguments={'title': ''})
File "E:\pythonvenv\flaskvenv\lib\site-packages\connexion\app.py", line 146, in add_api
debug=self.debug)
File "E:\pythonvenv\flaskvenv\lib\site-packages\connexion\api.py", line 89, in init
swagger_template = swagger_yaml.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 266: illegal multibyte sequence
Actual behaviour
Steps to reproduce
orig:
with swagger_yaml_path.open() as swagger_yaml:
swagger_template = swagger_yaml.read()
change:
with swagger_yaml_path.open(encoding='utf-8') as swagger_yaml:
swagger_template = swagger_yaml.read()
and then is run success.
Additional info:
Output of the commands:
python --version3.5.1
pip show connexion | grep "^Version\:"
connexion-1.0.97
in windows10 64 run
The text was updated successfully, but these errors were encountered:
By default, python tries to open files with your system's prefered encoding (as returned by locale.getpreferredencoding()) Hardcoding 'utf-8' breaking connexion for people that want to use other encodings. A solution would be to include an optional encoding argument to add_api
Description
swagger-editer generator server python flask based connexion, when i run app.
Expected bahaviour
Traceback (most recent call last):
File "E:\eclipsephp\plugins\org.python.pydev_4.5.4.201601292234\pysrc\pydevd.py", line 1524, in
globals = debugger.run(setup['file'], None, None, is_module)
File "E:\eclipsephp\plugins\org.python.pydev_4.5.4.201601292234\pysrc\pydevd.py", line 931, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "E:\eclipsephp\plugins\org.python.pydev_4.5.4.201601292234\pysrc_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "E:\pworkspace\testrest\examples\python-flask-server\app.py", line 6, in
app.add_api('swagger.yaml', arguments={'title': ''})
File "E:\pythonvenv\flaskvenv\lib\site-packages\connexion\app.py", line 146, in add_api
debug=self.debug)
File "E:\pythonvenv\flaskvenv\lib\site-packages\connexion\api.py", line 89, in init
swagger_template = swagger_yaml.read()
UnicodeDecodeError: 'gbk' codec can't decode byte 0xaf in position 266: illegal multibyte sequence
Actual behaviour
Steps to reproduce
orig:
with swagger_yaml_path.open() as swagger_yaml:
swagger_template = swagger_yaml.read()
change:
with swagger_yaml_path.open(encoding='utf-8') as swagger_yaml:
swagger_template = swagger_yaml.read()
and then is run success.
Additional info:
Output of the commands:
python --version
3.5.1pip show connexion | grep "^Version\:"
connexion-1.0.97
in windows10 64 run
The text was updated successfully, but these errors were encountered: