[Buildbot-commits] [Buildbot] #2415: exceptions.TypeError: <buildbot.status.buildset.BuildSetStatus instance at 0x10c502cb0> is not JSON serializable

Buildbot nobody at buildbot.net
Sat Dec 15 19:56:44 UTC 2012


#2415: exceptions.TypeError: <buildbot.status.buildset.BuildSetStatus instance at
0x10c502cb0> is not JSON serializable
--------------------+------------------------
Reporter:  virgilg  |       Owner:
    Type:  defect   |      Status:  new
Priority:  major    |   Milestone:  undecided
 Version:  0.8.5    |  Resolution:
Keywords:           |
--------------------+------------------------
Changes (by dustin):

 * version:  0.8.7p1 => 0.8.5


Old description:

> This buildmaster is running 0.8.5. I have applied the patches from
> http://trac.buildbot.net/ticket/1947 but we're still seeing the errors
> below. The database is MySQL-driven. The original ticket mentions
> 'builders with no changes' were potentially causing this. What does that
> mean exactly, and how can I check if that's the case?
>
> Thank you,
> Virgil
>
> 2012-12-14 16:23:50-0800 [-] Unhandled Error
>         Traceback (most recent call last):
>           File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/application/app.py",
> line 445, in startReactor
>             self.config, oldstdout, oldstderr, self.profiler, reactor)
>           File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/application/app.py",
> line 348, in runReactorWithLogging
>             reactor.run()
>           File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/internet/base.py",
> line 1128, in run
>             self.mainLoop()
>           File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/internet/base.py",
> line 1137, in mainLoop
>             self.runUntilCurrent()
>         --- <exception caught here> ---
>           File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/internet/base.py",
> line 757, in runUntilCurrent
>             call.func(*call.args, **call.kw)
>           File "/Library/Python/2.6/site-
> packages/buildbot-0.8.5-py2.6.egg/buildbot/status/status_push.py", line
> 89, in hookPushCb
>             return serverPushCb(self)
>           File "/Library/Python/2.6/site-
> packages/buildbot-0.8.5-py2.6.egg/buildbot/status/status_push.py", line
> 398, in pushHttp
>             (encoded_packets, items) = self.popChunk()
>           File "/Library/Python/2.6/site-
> packages/buildbot-0.8.5-py2.6.egg/buildbot/status/status_push.py", line
> 380, in popChunk
>             packets = json.dumps(items, separators=(',',':'))
>           File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/__init__.py",
> line 237, in dumps
>             **kw).encode(obj)
>           File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
> line 367, in encode
>             chunks = list(self.iterencode(o))
>           File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
> line 306, in _iterencode
>             for chunk in self._iterencode_list(o, markers):
>           File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
> line 204, in _iterencode_list
>             for chunk in self._iterencode(value, markers):
>           File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
> line 309, in _iterencode
>             for chunk in self._iterencode_dict(o, markers):
>           File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
> line 275, in _iterencode_dict
>             for chunk in self._iterencode(value, markers):
>           File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
> line 309, in _iterencode
>             for chunk in self._iterencode_dict(o, markers):
>           File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
> line 275, in _iterencode_dict
>             for chunk in self._iterencode(value, markers):
>           File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
> line 317, in _iterencode
>             for chunk in self._iterencode_default(o, markers):
>           File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
> line 323, in _iterencode_default
>             newobj = self.default(o)
>           File
> "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
> line 344, in default
>             raise TypeError(repr(o) + " is not JSON serializable")
>         exceptions.TypeError: <buildbot.status.buildset.BuildSetStatus
> instance at 0x10c502cb0> is not JSON serializable

New description:

 This buildmaster is running 0.8.5. I have applied the patches from
 http://trac.buildbot.net/ticket/1947 but we're still seeing the errors
 below. The database is MySQL-driven. The original ticket mentions
 'builders with no changes' were potentially causing this. What does that
 mean exactly, and how can I check if that's the case?

 Thank you,
 Virgil

 {{{
 2012-12-14 16:23:50-0800 [-] Unhandled Error
         Traceback (most recent call last):
           File
 "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/application/app.py",
 line 445, in startReactor
             self.config, oldstdout, oldstderr, self.profiler, reactor)
           File
 "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/application/app.py",
 line 348, in runReactorWithLogging
             reactor.run()
           File
 "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/internet/base.py",
 line 1128, in run
             self.mainLoop()
           File
 "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/internet/base.py",
 line 1137, in mainLoop
             self.runUntilCurrent()
         --- <exception caught here> ---
           File
 "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/twisted/internet/base.py",
 line 757, in runUntilCurrent
             call.func(*call.args, **call.kw)
           File "/Library/Python/2.6/site-
 packages/buildbot-0.8.5-py2.6.egg/buildbot/status/status_push.py", line
 89, in hookPushCb
             return serverPushCb(self)
           File "/Library/Python/2.6/site-
 packages/buildbot-0.8.5-py2.6.egg/buildbot/status/status_push.py", line
 398, in pushHttp
             (encoded_packets, items) = self.popChunk()
           File "/Library/Python/2.6/site-
 packages/buildbot-0.8.5-py2.6.egg/buildbot/status/status_push.py", line
 380, in popChunk
             packets = json.dumps(items, separators=(',',':'))
           File
 "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/__init__.py",
 line 237, in dumps
             **kw).encode(obj)
           File
 "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
 line 367, in encode
             chunks = list(self.iterencode(o))
           File
 "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
 line 306, in _iterencode
             for chunk in self._iterencode_list(o, markers):
           File
 "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
 line 204, in _iterencode_list
             for chunk in self._iterencode(value, markers):
           File
 "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
 line 309, in _iterencode
             for chunk in self._iterencode_dict(o, markers):
           File
 "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
 line 275, in _iterencode_dict
             for chunk in self._iterencode(value, markers):
           File
 "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
 line 309, in _iterencode
             for chunk in self._iterencode_dict(o, markers):
           File
 "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
 line 275, in _iterencode_dict
             for chunk in self._iterencode(value, markers):
           File
 "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
 line 317, in _iterencode
             for chunk in self._iterencode_default(o, markers):
           File
 "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
 line 323, in _iterencode_default
             newobj = self.default(o)
           File
 "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/json/encoder.py",
 line 344, in default
             raise TypeError(repr(o) + " is not JSON serializable")
         exceptions.TypeError: <buildbot.status.buildset.BuildSetStatus
 instance at 0x10c502cb0> is not JSON serializable
 }}}

--

Comment:

 That fix (#1947) was for `status_json`.  You're using `status_push`, which
 might need a similar fix.

 The fix is, essentially, checking that something has an asDict method
 before trying to call it.

-- 
Ticket URL: <http://trac.buildbot.net/ticket/2415#comment:1>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation


More information about the Commits mailing list