JSONDecodeError will be raised if the given JSON document is not valid.
http://simplejson.readthedocs.org/en/latest/

Ilya

From: Rob Leclerc <robert.leclerc@gmail.com>
Date: Friday, March 8, 2013 12:01 AM
To: "galaxy-dev@bx.psu.edu" <galaxy-dev@bx.psu.edu>
Subject: [galaxy-dev] BioBlend: Problem Running Example file

I had trouble running blend4j, so I tried to jump into python (a language I have little experience with).

I tried running the example run_import_workflow.py 

% python run_imported_workflow.py http://localhost:8080 8c25bc83f6f9e4001dd21eb7b64f063f

but I get an error:

Initiating Galaxy connection
Importing workflow
Creating data library 'Imported data for API demo'

Traceback (most recent call last):
  File "run_imported_workflow.py", line 53, in <module>
    library_dict = gi.libraries.create_library(library_name)
  File "build/bdist.macosx-10.6-intel/egg/bioblend/galaxy/libraries/__init__.py", line 27, in create_library
  File "build/bdist.macosx-10.6-intel/egg/bioblend/galaxy/client.py", line 53, in _post
  File "build/bdist.macosx-10.6-intel/egg/bioblend/galaxy/__init__.py", line 132, in make_post_request
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/requests-1.1.0-py2.7.egg/requests/models.py", line 604, in json
    return json.loads(self.text or self.content)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/simplejson-3.1.0-py2.7-macosx-10.6-intel.egg/simplejson/__init__.py", line 454, in loads
    return _default_decoder.decode(s)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/simplejson-3.1.0-py2.7-macosx-10.6-intel.egg/simplejson/decoder.py", line 374, in decode
    obj, end = self.raw_decode(s)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/simplejson-3.1.0-py2.7-macosx-10.6-intel.egg/simplejson/decoder.py", line 393, in raw_decode
    return self.scan_once(s, idx=_w(s, idx).end())
simplejson.scanner.JSONDecodeError: Expecting value: line 1 column 1 (char 0)


Is there anything I am missing from the stock configuration which would cause this not to run out of the box?

Cheers,
Rob