Message81378
| Author |
shamilbi |
| Recipients |
shamilbi, vinay.sajip |
| Date |
2009年02月08日.13:36:19 |
| SpamBayes Score |
1.0183713e-06 |
| Marked as misclassified |
No |
| Message-id |
<1234100183.8.0.366907728495.issue5170@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
test_log.py:
-----------
#! -*- coding: windows-1251 -*-
import logging
logger = logging.getLogger('test_log')
logger.addHandler(logging.FileHandler('test.log', encoding='cp1251'))
logger.setLevel(logging.DEBUG)
logger.debug(u'Привет') # russian Hello
exception:
---------
Traceback (most recent call last):
File "e:\bin\python0円\lib\logging\__init__.py", line 765, in emit
self.stream.write(fs % msg.encode("UTF-8"))
File "e:\bin\python0円\lib\codecs.py", line 686, in write
return self.writer.write(data)
File "e:\bin\python0円\lib\codecs.py", line 351, in write
data, consumed = self.encode(object, self.errors)
File "e:\bin\python0円\lib\encodings\cp1251.py", line 12, in encode
return codecs.charmap_encode(input,errors,encoding_table)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 0:
ordinal not in range(128) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2009年02月08日 13:36:24 | shamilbi | set | recipients:
+ shamilbi, vinay.sajip |
| 2009年02月08日 13:36:23 | shamilbi | set | messageid: <1234100183.8.0.366907728495.issue5170@psf.upfronthosting.co.za> |
| 2009年02月08日 13:36:22 | shamilbi | link | issue5170 messages |
| 2009年02月08日 13:36:21 | shamilbi | create |
|