python script aborts on Ubuntu 16.04: No JSON object could be decoded

M. Fioretti mfioretti at
Mon Aug 27 18:13:39 UTC 2018


I am trying to run this Python script:

to import a collection of bookmarks in a test install, on the SAME 
Ubuntu box,
of the the Shaarli bookmark manager

After installing the python-jwt and python-requests modules, the script 
starts but fails with the error message below. The behavior does not 
change at all if, instead of reading the data to import from a file, I 
hardwire them into the script itself one by one, i.e. if I add 
statements like:

new_bookmark["url"] = ""

I have already asked for support on the shaarli developers forum. I am 
also asking here to be sure that it is not some Ubuntu-specific issue, 
i.e. python modules packaging issues, extra settings needed, whatever.

Any help greatly appreciated,



DEBUG: New Shaarli bookmark: {'url': '', 
'description': 'this is the description of the test link', 'private': 
True, 'title': 'testing shaarli with some page'}
{"url": "", "description": "this is the description 
of the test link", "private": true, "title": "testing shaarli with some 
INFO: Sending link
INFO: Starting new HTTP connection (1):
DEBUG: "POST /shaarli/ HTTP/1.1" 200 2345
Traceback (most recent call last):
   File "./", line 162, in <module>
   File "/usr/lib/python2.7/dist-packages/requests/", line 808, 
in json
     return complexjson.loads(self.text, **kwargs)
   File "/usr/lib/python2.7/json/", line 339, in loads
     return _default_decoder.decode(s)
   File "/usr/lib/python2.7/json/", line 364, in decode
     obj, end = self.raw_decode(s, idx=_w(s, 0).end())
   File "/usr/lib/python2.7/json/", line 382, in raw_decode
     raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded


More information about the ubuntu-users mailing list