By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,820 Members | 957 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,820 IT Pros & Developers. It's quick & easy.

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 74: ordinal not

P: 1
I use the ubuntu10.04, and when i compile a package which is in ROS, the error occurs as following:
File "/usr/lib/python2.6/logging/handlers.py", line 76, in emit
if self.shouldRollover(record):
File "/usr/lib/python2.6/logging/handlers.py", line 149, in shouldRollover
msg = "%s\n" % self.format(record)
File "/usr/lib/python2.6/logging/__init__.py", line 648, in format
return fmt.format(record)
File "/usr/lib/python2.6/logging/__init__.py", line 436, in format
record.message = record.getMessage()
File "/usr/lib/python2.6/logging/__init__.py", line 306, in getMessage
msg = msg % self.args
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe6 in position 74: ordinal not in range(128)

I also do the following commands and it shows the message:
rct@rct-desktop:~$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56)
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getlocale()
(None, None)
>>> locale.setlocale(locale.LC_ALL,"")
'zh_HK.utf8'
>>> locale.getlocale()
('zh_HK', 'UTF8')
>>>
Mar 13 '12 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.