Thomas Guettler wrote:
> Stefan Behnel schrieb:
>> Thomas Guettler wrote:
>>> My quick fix is this:
>>>
>>> class MyFormatter(logging.Formatter):
>>> def format(self, record):
>>> msg=logging.Formatter.format(self, record)
>>> if isinstance(msg, str):
>>> msg=msg.dec
Stefan Behnel schrieb:
> Thomas Guettler wrote:
>> My quick fix is this:
>>
>> class MyFormatter(logging.Formatter):
>> def format(self, record):
>> msg=logging.Formatter.format(self, record)
>> if isinstance(msg, str):
>> msg=msg.decode('utf8', 'replace')
>>
Thomas Guettler wrote:
> My quick fix is this:
>
> class MyFormatter(logging.Formatter):
> def format(self, record):
> msg=logging.Formatter.format(self, record)
> if isinstance(msg, str):
> msg=msg.decode('utf8', 'replace')
> return msg
>
> But I still thi
Thomas Guettler wrote:
> My quick fix is this:
>
> class MyFormatter(logging.Formatter):
> def format(self, record):
> msg=logging.Formatter.format(self, record)
> if isinstance(msg, str):
> msg=msg.decode('utf8', 'replace')
> return msg
>
> But I still thi
My quick fix is this:
class MyFormatter(logging.Formatter):
def format(self, record):
msg=logging.Formatter.format(self, record)
if isinstance(msg, str):
msg=msg.decode('utf8', 'replace')
return msg
But I still think handling of non-ascii byte strings shoul
Thomas Guettler wrote:
> Hi,
>
> I have bug in my code, which results in the same error has this one:
>
> https://bugs.launchpad.net/bzr/+bug/295653
> {{{
> Traceback (most recent call last):
> File "/usr/lib/python2.6/logging/__init__.py", line 765, in emit
> self.stream.write(fs % msg.enc
Thomas Guettler wrote:
> I have bug in my code, which results in the same error has this one:
>
> https://bugs.launchpad.net/bzr/+bug/295653
> {{{
> Traceback (most recent call last):
> File "/usr/lib/python2.6/logging/__init__.py", line 765, in emit
> self.stream.write(fs % msg.encode("UTF
Thomas Guettler wrote:
> Hi,
>
> I have bug in my code, which results in the same error has this one:
>
> https://bugs.launchpad.net/bzr/+bug/295653
> {{{
> Traceback (most recent call last):
> File "/usr/lib/python2.6/logging/__init__.py", line 765, in emit
> self.stream.write(fs % msg.enc
Hi,
I have bug in my code, which results in the same error has this one:
https://bugs.launchpad.net/bzr/+bug/295653
{{{
Traceback (most recent call last):
File "/usr/lib/python2.6/logging/__init__.py", line 765, in emit
self.stream.write(fs % msg.encode("UTF-8"))
..
UnicodeDecodeError: 'a