On my production server, I periodically make a unicode error, but not on my desktop. It appears in the logs:
2011-03-17 13:14:53+0000 [GameProtocol,941,95.78.43.17] <unicode instance at 0x9e304a0 with str error: Traceback (most recent call last): File "/usr/local/lib/python2.6/dist-packages/twisted/python/reflect.py", line 546, in _safeFormat return formatter(o) UnicodeEncodeError: 'ascii' codec can't encode characters in position 21-26: ordinal not in range(128) >
It does not affect any logic in the application, but it is annoying in the logs.
The server runs under Ubuntu 10.10 Server, Python 2.6.5, Twisted 10.2.0.
Ubuntu 10.10 Desktop, Python 2.6.5, Twisted 10.2.0.
Locales are the same:
$ locale LANG=en_US.UTF-8 LANGUAGE=en_US.UTF-8 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=en_US.UTF-8
What is the problem?
source share