[Buildbot-devel] UnicodeDecodeError in webfrontend

Spielmann, Christoph christoph.spielmann at machineering.de
Fri Mar 1 12:36:36 UTC 2013


Hi,

Since today (1. März in german speaking countries) the BuildBot-webfrontend seems to have a hard time parsing time-/date-strings. I regularily get an exception with the following stacktrace:

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

If i restart the master it works for some time but sooner or later i receive the exception again. I tried to fix it with the following patch:

--- base.py.orig        2013-03-01 12:24:14.063879294 +0100
+++ base.py     2013-03-01 12:25:12.610879486 +0100
@@ -205,8 +205,8 @@
                     stylesheet = rootpath + 'default.css',
                     path_to_root = rootpath,
                     version = version,
-                    time = time.strftime("%a %d %b %Y %H:%M:%S",
-                                        time.localtime(util.now())),
+                    time = unicode(time.strftime("%a %d %b %Y %H:%M:%S",
+                                        time.localtime(util.now()))),
                     tz = locale_tz,
                     metatags = [],
                     pageTitle = self.getPageTitle(request),

But this didn't help. Anybody else experiencing the same issue?

Thanks in advance,

Christoph
--
-- 
--------------------------------------------
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

--------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://buildbot.net/pipermail/devel/attachments/20130301/24c6f430/attachment.html>


More information about the devel mailing list