Open mrkafk opened 10 years ago
Hi,
Thanks for the trick with 'reload'. That would work around the problem of setdefaultencoding killing itself. I've added this. Upload pending.
Erik
Erik Groeneveld ♦ seecr.nl ♦ +31 624 584 029
On Wed, Aug 21, 2013 at 1:51 PM, mrkafk notifications@github.com wrote:
(w2)d7 192.168.56.101 ~/w2/tmp/weightless-core/weightless/examples % ./httpserver.py Traceback (most recent call last): File "./httpserver.py", line 26, in
from weightless.core import be File "/root/w2/local/lib/python2.7/site-packages/weightless/init.py", line 30, in assert _getdefaultencoding() == 'utf-8', 'Please ensure that the default encoding is utf-8' AssertionError: Please ensure that the default encoding is utf-8 (w2)d7 192.168.56.101 ~/w2/tmp/weightless-core/weightless/examples % Fixed by adding the following to httpserver.py:
import sys reload(sys) sys.setdefaultencoding("utf-8")
OS: Debian 7 / x64, installed default utf-8 locale.
(w2)d7 192.168.56.101 ~/w2/tmp/weightless-core/weightless/examples % locale LANG=en_US.UTF-8 LANGUAGE= LC_CTYPE="en_US.UTF-8" LC_NUMERIC="en_US.UTF-8" LC_TIME="en_US.UTF-8" LC_COLLATE="en_US.UTF-8" LC_MONETARY="en_US.UTF-8" LC_MESSAGES="en_US.UTF-8" LC_PAPER="en_US.UTF-8" LC_NAME="en_US.UTF-8" LC_ADDRESS="en_US.UTF-8" LC_TELEPHONE="en_US.UTF-8" LC_MEASUREMENT="en_US.UTF-8" LC_IDENTIFICATION="en_US.UTF-8" LC_ALL=
— Reply to this email directly or view it on GitHubhttps://github.com/seecr/weightless-core/issues/2 .
Fixed by adding the following to httpserver.py:
OS: Debian 7 / x64, installed default utf-8 locale.