[Buildbot-devel] UnicodeDecodeError in webfrontend

Christoph Spielmann christoph.spielmann at machineering.de
Mon Mar 4 11:01:37 UTC 2013


I tried to apply your fix (i don't know if this was the correct place 
but from my understanding this should go to status/web/base.py) but to 
no avail, i still get the same error:

2013-03-04 11:02:09+0100 [HTTPChannel,11,] Unhandled Error
         Traceback (most recent call last):
"/usr/lib64/python2.7/site-packages/twisted/protocols/basic.py", line 
564, in dataReceived
             why = self.lineReceived(line)
"/usr/lib64/python2.7/site-packages/twisted/web/http.py", line 1551, in 
"/usr/lib64/python2.7/site-packages/twisted/web/http.py", line 1619, in 
             req.requestReceived(command, path, version)
"/usr/lib64/python2.7/site-packages/twisted/web/http.py", line 773, in 
         --- <exception caught here> ---
"/usr/lib64/python2.7/site-packages/twisted/web/server.py", line 127, in 
"/usr/lib64/python2.7/site-packages/twisted/web/server.py", line 147, in 
             body = resrc.render(self)
"/usr/lib64/python2.7/site-packages/buildbot/status/web/base.py", line 
324, in render
             ctx = self.getContext(request)
"/usr/lib64/python2.7/site-packages/buildbot/status/web/base.py", line 
209, in getContext
             time.localtime(util.now())).encode('ascii', 'replace'),
         exceptions.UnicodeDecodeError: 'ascii' codec can't decode byte 
0xe4 in position 7: ordinal not in range(128)

Furthermore i remarked yesterday that jinja needs Babel for i18n-stuff 
so i checked if that is missing and it actually was but this was another 
dead end...

If i restart the buildmaster and look at the footer of the pages i see this:

BuildBot (0.8.7p1) working for the Machineering project.
Page built: Mon 04 Mar 2013 11:45:47 (CET)

And this is what really makes me wonder what is going on that suddenly 
somehow a 'ä' is appearing in the date. If there would be a general 
problem in the way the date is rendered, shouldn't it pop up as soon 
jinja is trying to render the page? Especially for the first time?

Thanks again for your help,


On 03.03.2013 17:11, Dustin J. Mitchell wrote:
> On Sun, Mar 3, 2013 at 2:53 AM, Spielmann, Christoph
> <christoph.spielmann at machineering.de> wrote:
>> And this is the original error message i received, maybe this rings a bell:
> Ah!  That at least makes sense.
> I don't know why Jinja2 is trying to render to ascii.  The quick fix would be
> +                    time = time.strftime("%a %d %b %Y %H:%M:%S",
> +
> time.localtime(util.now())).encode('ascii', 'replace'),
> which will encode the time in ascii, replacing problematic characters.
> Dustin

Dipl.-Ing. Christoph Spielmann

machineering GmbH & Co. KG
Simulation und Automatisierung
Pfrontener Platz 25a
80686 München

Tel: + 49 (0) 89 54 72 69 - 28
Mail:  christoph.spielmann at machineering.de
Web: www.machineering.de


machineering GmbH & Co. KG, HRA 94550, Amtsgericht München
machineering Verwaltungs-GmbH, HRB 181877, Amtsgericht München
Ust-IdNr.: DE268988178
Geschäftsführung: B.Freyer


More information about the devel mailing list