JSONWSPClient example not working

Asked by Tim-Oliver Husser

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?

Question information

Language:
English Edit question
Status:
Expired
For:
ladon Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.