-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
(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 <module>
from weightless.core import be
File "/root/w2/local/lib/python2.7/site-packages/weightless/__init__.py", line 30, in <module>
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=
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels