[Bug 1714960] Update Released

Łukasz Zemczak 1714960 at bugs.launchpad.net
Mon Jul 15 08:19:31 UTC 2019


The verification of the Stable Release Update for lazr.restfulclient has
completed successfully and the package has now been released to
-updates.  Subsequently, the Ubuntu Stable Release Updates Team is being
unsubscribed and will not receive messages about this bug report.  In
the event that you encounter a regression using the package from
-updates please report a new bug using ubuntu-bug and tag the bug report
regression-update so we can easily find any regressions.

-- 
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/1714960

Title:
  getArchiveSubscriptionURL() crashes on python3

Status in lazr.restfulclient:
  Fix Released
Status in lazr.restfulclient package in Ubuntu:
  Fix Released
Status in lazr.restfulclient source package in Xenial:
  Fix Released

Bug description:
  [Impact]

  When trying to use the me.getArchiveSubscriptionURL() call on Python
  3, an exception is generated:

  Traceback (most recent call last):
    File "./test.py", line 9, in <module>
      print(me.getArchiveSubscriptionURL(archive=ppa))
    File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 622, in __call__
      self.resource.lp_refresh()
    File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 759, in lp_refresh
      super(Entry, self).lp_refresh(new_url, etag)
    File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 346, 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 516, 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)

  The same code works fine on python2 (e.g. lp-shell). Because of this
  being broken, I'm unable to add some modification for ESM precise
  handling in our kernel review scripts as those are Python 3 based.

  [Test Case]

  # Make sure you have a private PPA to which a subscription for the user is made
  from launchpadlib.launchpad import Launchpad
  PPA_LINK = '' # API link to the PPA here
  lp = Launchpad.login_with('test-broken-url', 'production', version='devel')
  ppa = lp.load(PPA_LINK)
  me = lp.load(lp.me.self_link)
  print(me.getArchiveSubscriptionURL(archive=ppa))

  [Regression Potential]

  Seriously none.

To manage notifications about this bug go to:
https://bugs.launchpad.net/lazr.restfulclient/+bug/1714960/+subscriptions



More information about the foundations-bugs mailing list