[Buildbot-devel] Nightly schedulers not running
Thomas Middeldorp
thomas at ranzer.geek.nz
Tue Nov 29 02:48:06 UTC 2011
After much puzzling and hair pulling I believe I have tracked this down to:
The make_scanner from simplejson._speedups not being able to handle
unicode strings containing floating point numbers with more than 1
decimal place.
Observe:
>>> from simplejson import decoder
>>> dec = decoder.JSONDecoder()
>>> dec.decode('1322162939.8104999')
1322162939.8104999
>>> dec.decode(u'1322162939.8104999')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/pymodules/python2.6/simplejson/decoder.py", line 338,
in decode
raise ValueError(errmsg("Extra data", s, end, len(s)))
ValueError: Extra data: line 1 column 17 - line 1 column 18 (char 17 - 18)
>>> dec.decode(u'1322162939.8')
1322162939.8
If I then change simplejson/scanner.py to force it to use the
py_make_scanner instead of c_make_scanner:
>>> from simplejson import decoder
>>> dec = decoder.JSONDecoder()
>>> dec.decode('1322162939.8104999')
1322162939.8104999
>>> dec.decode(u'1322162939.8104999')
1322162939.8104999
My question then becomes: How did this ever work, e.g what changed?
I figure either:
I somehow switched from using py_make_scanner to c_make_scanner.
I somehow went from having non-unicode strings in my object states to
having unicode strings.
c_make_scanner just broke somehow.
I never had more than 1 decimal place in my object state strings.
Something else.
The first 3 don't make a lot of sense to me as I'm all but certain I
didn't change anything code/package wise.
The 4th option just sounds unlikely, though I don't know what the actual
chances are.
If anyone has suggestions for the 5th option I would be grateful.
Without knowing what actually went wrong here it's hard to decide how to
fix this... I guess if all else fails I can just force simplejson to
always use the py_make_scanner, but I'd still kind of like to know what
happened.
Thanks,
Thomas
More information about the devel
mailing list