prune chokes on invalid JSON / invalid cache data

Bug #1401131 reported by Alexander List on 2014-12-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

Traceback (most recent call last):
File "bin/prune", line 61, in <module>
File "/srv/", line 117, in main
File "/srv/", line 71, in find_oops_references
lp_project = lp_projects[project]
File "/srv/", line 965, in __getitem__
File "/srv/", line 362, in _ensure_representation
representation = simplejson.loads(unicode(representation))
File "/srv/", line 413, in loads
return _default_decoder.decode(s)
File "/srv/", line 405, in decode
raise JSONDecodeError("Extra data", s, end, len(s))
simplejson.decoder.JSONDecodeError: Extra data: line 1 column 2995 - line 1 column 3069 (char 2995 - 3069)

We failed to identify the offending input data, but the prune job shouldn't choke on such data but rather handle it gracefully.

Emptying the cache in /home/oops_tools/.launchpadlib/ helped.

Maybe the cache could be cleaned up / invalidated on a regular basis as well.

Revision history for this message
Colin Watson (cjwatson) wrote :

I think this is a lazr.restfulclient bug. If a cached version of a resource is invalid, we should remove that entry from the cache and try fetching a fresh version.

affects: python-oops-tools → lazr.restfulclient
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers