[Buildbot-devel] svn_buildbot.py is generating an error on some commits

Alexander O'Donovan-Jones Alexander at ccpgames.com
Wed Dec 1 13:04:25 UTC 2010


I can't use a similar solution to yours, even though yours was presenting in svn; mine was with the perforce poller.
My company has a very large non English keyboard number of users, and so we have to support non ascii codecs.
I replaced the UnicodeEncodeError in twisted's log.py with this:

    actualEventDict['message'] = map(lambda x: str(x).decode(errors='replace'), message)

This way it doesn't matter what Buildbot throws at it, it'll be handled.

-----Original Message-----
From: Bailey, Darragh [mailto:dbailey at hp.com] 
Sent: Wednesday, December 01, 2010 12:49 PM
To: buildbot-devel at lists.sourceforge.net
Cc: Alexander O'Donovan-Jones
Subject: RE: [Buildbot-devel] svn_buildbot.py is generating an error on some commits


 

> -----Original Message-----
> From: Alexander O'Donovan-Jones [mailto:Alexander at ccpgames.com]
> Sent: 01 December 2010 01:01
> To: Bailey, Darragh; buildbot-devel at lists.sourceforge.net
> Subject: RE: [Buildbot-devel] svn_buildbot.py is generating an error 
> on some commits
> 
> Ha, I actually encountered this exact error only the other day. I 
> modified the logging in twisted to fix the unicode error, but I'm not 
> at my work computer to give you the exact code. Can you wait till 
> tomorrow?

No worries, I got around to debugging the problem a bit more this morning and traced it to a lack of 'unicode' encoding use no the svn_buildbot.py script.


Attached patch fixes the issue for me, although I'm somewhat rusty on working on buildbot so I'm not 100% sure this is correct. Pretty much ripped the idea from the git_buildbot.py script.

The problem was in the comment message, I suspect this was due to the developers use of eclipse and entering an apostrophe that eclipse replaced with a unicode version rather than the standard ascii one.

Copying the string into a variable in python and printing it to the screen produced print string[112] ▒

Code for the problem character was 226 while the standard ' is 39. Given that 226 > 127, it's no surprise that it caused problems. :-)

Not too sure how often this will show up. Seems I was just luck/unlucky when selecting which revision to use to test the change sending script.

I've run the script in a loop over all commits in our local repository all 2780 of them, and with the attached patch it no longer causes problems on the receiving side with any of them.

--
Regards,
Darragh Bailey




More information about the devel mailing list