deeppavlov / dp-agent

DeepPavlov Agent

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Encoding problem in console

acriptis opened this issue · comments

(.venv3) alx@x3:~/Workspace/dp-agent$ sudo docker exec -it agent /bin/bash
root@78b0394c15ef:/dp-agent# python3 -m core.run
[nltk_data] Downloading package punkt to /root/nltk_data...
[nltk_data]   Unzipping tokenizers/punkt.zip.
[nltk_data] Downloading package stopwords to /root/nltk_data...
[nltk_data]   Unzipping corpora/stopwords.zip.
[nltk_data] Downloading package perluniprops to /root/nltk_data...
[nltk_data]   Unzipping misc/perluniprops.zip.
[nltk_data] Downloading package nonbreaking_prefixes to
[nltk_data]     /root/nltk_data...
[nltk_data]   Unzipping corpora/nonbreaking_prefixes.zip.
Provide user id: 1
You (1): Привет
Bot:  Дубль два: привет!
You (1): Что умеешь?
Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/dp-agent/core/run.py", line 166, in <module>
    main()
  File "/dp-agent/core/run.py", line 159, in main
    msg = input(f'You ({user_id}): ')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 11: invalid continuation byte

Is it happening in PyCharm?

No, in usual console (I use Guake with bash)

Fixed by #19