[Bug 1425627] Re: [py3] bug.subscribe() crashes with simplejson.scanner.JSONDecodeError
Martin Pitt
martin.pitt at ubuntu.com
Wed Feb 25 18:03:17 UTC 2015
This is my attempt at reproducing, which already became reasonably
complicated... So for now reproducing with apport's test suite should
work.
** Attachment added: "reproducer attempt (fails)"
https://bugs.launchpad.net/ubuntu/+source/lazr.restfulclient/+bug/1425627/+attachment/4327337/+files/test.py
** Changed in: lazr.restfulclient (Ubuntu)
Assignee: (unassigned) => Dimitri John Ledkov (xnox)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to lazr.restfulclient in Ubuntu.
https://bugs.launchpad.net/bugs/1425627
Title:
[py3] bug.subscribe() crashes with simplejson.scanner.JSONDecodeError
Status in lazr.restfulclient package in Ubuntu:
New
Bug description:
While porting Apport to python 3 I stumbled over this exception:
bzr branch lp:apport
cd apport
ln -s ../backends/packaging-apt-dpkg.py apport/packaging_impl.py
# work around bug 1425575
wget -O- http://people.canonical.com/~pitti/tmp/apport.workaround-1425575.patch | patch -p1
PYTHONPATH=. python3 apport/crashdb_impl/launchpad.py -v _T.test_2_update_traces
crashes with
ERROR: test_2_update_traces (__main__._T)
update_traces()
----------------------------------------------------------------------
Traceback (most recent call last):
File "apport/crashdb_impl/launchpad.py", line 1329, in test_2_update_traces
self.crashdb.update_traces(self.get_segv_report(), r, 'good retrace!')
File "apport/crashdb_impl/launchpad.py", line 471, in update_traces
self._subscribe_triaging_team(bug, report)
File "apport/crashdb_impl/launchpad.py", line 930, in _subscribe_triaging_team
bug.subscribe(person=person)
File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 623, in __call__
self.resource.lp_refresh()
File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 760, in lp_refresh
super(Entry, self).lp_refresh(new_url, etag)
File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 347, in lp_refresh
representation, self.JSON_MEDIA_TYPE)
File "/usr/lib/python3/dist-packages/wadllib/application.py", line 363, in bind
representation_definition)
File "/usr/lib/python3/dist-packages/wadllib/application.py", line 300, in __init__
_make_unicode(representation))
File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 505, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in decode
obj, end = self.raw_decode(s)
File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Unfortunately I wasn't able to come up with a simple reproducer script for this. Something like
bug = lp.bugs[123456]
person = '%s~ubuntu-crashes-universe' % lp._root_uri
bug.subscribe(person=person)
works fine, so there must be some more internal state keeping which
messes this up. Please let me know if you need a simpler reproducer
for this, then I'll try harder.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lazr.restfulclient/+bug/1425627/+subscriptions
More information about the foundations-bugs
mailing list