← Back to team overview

ladon-dev-team team mailing list archive

[Question #289269]: JSONWSPClient example not working

 

New question #289269 on ladon:
https://answers.launchpad.net/ladon/+question/289269

I'm trying to run the "Python JSON-WSP Client" example from http://www.ladonize.org/index.php/Python_Example. Unfortunately it doesn't work...

With Python 2.7 I get:
Traceback (most recent call last):
  File "client.py", line 4, in <module>
    cli = JSONWSPClient('http://ladonize.org/python-demos/AlbumService')
  File "/usr/local/lib/python2.7/dist-packages/ladon/clients/jsonwsp.py", line 145, in __init__
    self.parse_description()
  File "/usr/local/lib/python2.7/dist-packages/ladon/clients/jsonwsp.py", line 269, in parse_description
    self.jsonwsp_description = json.loads(PORTABLE_STRING(jsonwsp_response.response_body,response_charset))
  File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 366, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 384, in raw_decode
    raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded


With Python 3.4 it is:
Traceback (most recent call last):
  File "client.py", line 4, in <module>
    cli = JSONWSPClient('http://ladonize.org/python-demos/AlbumService')
  File "/usr/local/lib/python3.4/dist-packages/ladon/clients/jsonwsp.py", line 145, in __init__
    self.parse_description()
  File "/usr/local/lib/python3.4/dist-packages/ladon/clients/jsonwsp.py", line 269, in parse_description
    self.jsonwsp_description = json.loads(PORTABLE_STRING(jsonwsp_response.response_body,response_charset))
  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 2 column 1 (char 1)

I'm using ladon 0.9.38. Any idea, what's going wrong here?


-- 
You received this question notification because your team Ladon
Developer is an answer contact for ladon.