Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnicodeDecodeError #45

Open
TheDeadOne opened this issue Mar 14, 2018 · 0 comments
Open

UnicodeDecodeError #45

TheDeadOne opened this issue Mar 14, 2018 · 0 comments

Comments

@TheDeadOne
Copy link
Contributor

On Windows when using swagger_from_file argument and YAML file contains Cyrillic letters I get an error:

Traceback (most recent call last):
  File "app.py", line 162, in <module>
    setup_swagger(app, swagger_from_file='swagger.yaml')
  File "D:\playground\python\env3\lib\site-packages\aiohttp_swagger\__init__.py"
, line 58, in setup_swagger
    swagger_info = load_doc_from_yaml_file(swagger_from_file)
  File "D:\playground\python\env3\lib\site-packages\aiohttp_swagger\helpers\buil
ders.py", line 123, in load_doc_from_yaml_file
    loaded_yaml = yaml.load(open(doc_path, "r").read())
  File "D:\playground\python\env3\lib\encodings\cp1251.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 871: char
acter maps to <undefined>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant