On Friday, October 5, 2012 10:53:24 AM UTC+2, Bram wrote:
>
> Hello all, 
>
>
> My login setup on my server does not enable console logging, only 
> to-file logging (see at the end of this message for the logger setup). 
> However, just now I got a unicode decode error in my logging: 
>
>
>   File "/home/xyz/site/xyz/views.py", line 520, in xx_yy_zz 
>     logger.error(u"Successfully decoded data but data is not json: %s" 
> % decoded) 
> UnicodeDecodeError: 'ascii' codec can't decode byte 0xb5 in position 
> 1: ordinal not in range(128) 
>
> I'm a bit puzzled by this as I'm logging only to files, which should 
> be written as UTF-8... 
> If anyone has a clue, let me know! 
>

It's seems like the string you interpolate is not ascii-decodable, try 
unicode.decode(encoding='utf-8') before interpolation
 
Do you know about sentry <https://www.getsentry.com/welcome/> ?


HTH,


Amirouche

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/KfR1AWoZERsJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to