[Bug 1403524] Re: [py3] getSourcePackage() crashes with ValueError: Expecting value: line 1 column 1 (char 0)

Launchpad Bug Tracker 1403524 at bugs.launchpad.net
Thu Jan 22 15:18:11 UTC 2015


This bug was fixed in the package lazr.restfulclient - 0.13.4-3

---------------
lazr.restfulclient (0.13.4-3) experimental; urgency=medium


  * Fix json loads (LP: #1403524).

 -- Dimitri John Ledkov <dimitri.j.ledkov at linux.intel.com>  Wed, 21 Jan
2015 18:58:46 +0000

** Changed in: lazr.restfulclient (Ubuntu)
       Status: Triaged => Fix Released

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

Title:
  [py3] getSourcePackage() crashes with ValueError: Expecting value:
  line 1 column 1 (char 0)

Status in lazr.restfulclient package in Ubuntu:
  Fix Released

Bug description:
  With python3-launchpadlib, the getSourcePackage() API call fails:

  $ python3 ~/test.py 
  distro: https://api.staging.launchpad.net/1.0/ubuntu
  Traceback (most recent call last):
    File "/home/martin/test.py", line 8, in <module>
      pkg = ubuntu.getSourcePackage(name='coreutils')
    File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 621, in __call__
      return self._handle_200_response(url, response, content)
    File "/usr/lib/python3/dist-packages/lazr/restfulclient/resource.py", line 656, in _handle_200_response
      document = loads(text_type(content))
    File "/usr/lib/python3.4/json/__init__.py", line 318, in loads
      return _default_decoder.decode(s)
    File "/usr/lib/python3.4/json/decoder.py", line 343, in decode
      obj, end = self.raw_decode(s, idx=_w(s, 0).end())
    File "/usr/lib/python3.4/json/decoder.py", line 361, in raw_decode
      raise ValueError(errmsg("Expecting value", s, err.value)) from None
  ValueError: Expecting value: line 1 column 1 (char 0)

  With python-launchpadlib (py2) it works fine:

  $ python ~/test.py 
  ('distro:', <distribution at https://api.staging.launchpad.net/1.0/ubuntu>)
  ('pkg:', <distribution_source_package at https://api.staging.launchpad.net/1.0/ubuntu/+source/coreutils>)

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



More information about the foundations-bugs mailing list