UnicodeDecodeError: 'utf8' codec can't decode bytes in position 2-4: invalid data

Alessandro Ronchi alessandro.ronchi at soasi.com
Tue Mar 9 10:42:16 CET 2010


I am using django and I have a lot of this unicode error I didn't get
before use varnish:
http://dpaste.com/167139/

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
handler.addQuickElement(u"pubDate",
rfc2822_date(item['pubdate']).decode('utf-8'))

 File "/usr/lib/python2.4/encodings/utf_8.py", line 16, in decode
  return codecs.utf_8_decode(input, errors, True)

UnicodeDecodeError: 'utf8' codec can't decode bytes in position 2-4:
invalid data
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This is my varnish configuration:
http://dpaste.com/169807/

It's strange because I made HTTP_ACCEPT_CHARSET header to only utf-8,
and I have only unicode.

as you can see here:
http://hobbygiochi.com/xml/cat/da-vinci-games

the page works, but not always.

Any hint?

Thanks in advance.


-- 
Alessandro Ronchi

http://www.soasi.com
SOASI - Sviluppo Software e Sistemi Open Source

http://hobbygiochi.com
Hobby & Giochi, l'e-commerce del divertimento



More information about the varnish-misc mailing list