Click will abort further execution because Python 3 was configured to use ASCII as encoding for the environment

后端 未结 3 742
遇见更好的自我
遇见更好的自我 2021-01-31 15:08

I downloaded Quokka Python/Flask CMS to a CentOS7 server. Everything works fine with command

sudo python3 manage.py runserver --host 0.0.0.0 --port 80

3条回答
  •  逝去的感伤
    2021-01-31 15:45

    If you are trying to execute tests case you must set the following environment variables each time:

    export LC_ALL=en_US.utf-8
    export LANG=en_US.utf-8
    

    Doing this each time will resolve the error.

    It may also be possible to set this in your IDE run configuration as

    LC_ALL=en_US.UTF-8;LANG=en_US.UTF-8
    

    For example see the following setting in PyCharm 2016:

提交回复
热议问题