FunctionLab/giant-api

ValueError: No JSON object could be decoded, Problem running NetWAS

Opened this issue · 0 comments

Hello,
I am trying to run NetWAS from API. I am using Python 2.7.17 for running the program. But getting following error. Can anyone help me on this.

$python demo.py
Started demo.py at 2021-09-13 19:49:43.098685.

This script uses the GIANT API to run a NetWAS job in demo mode, which is
invoked by the setting "tissue=api-demo". This simulates a short SVM training,
which completes in under 2 minutes. In order to run NetWAS on actual tissues,
please replace "api-demo" with one of the 144 tissue choices supported by the
API. Valid options are listed at http://giant-api.princeton.edu/tissues. Note
that non-demo NetWAS tasks may take up to 30 minutes to complete.

Step 1: Create new NetWAS job..
Done. Job details (prior to submission to GIANT server):

{
"id": null,
"created": null,
"title": "GIANT API NetWAS Example in Python",
"email": "",
"gwas_file": "./bmi-2012.out",
"tissue": "api-demo",
"p_value": 0.01,
"log_file": null,
"results_file": null,
"status": null
}
<<<

Step 2: Submit NetWAS job to GIANT server and start SVM training..
Traceback (most recent call last):
File "demo.py", line 37, in
nj1.start()
File "/mnt/d/COVID_work_sujoy/COVID_work_release_6/analysis/NetWAS/giant-api/client/python/giantapi.py", line 97, in start
self.init()
File "/mnt/d/COVID_work_sujoy/COVID_work_release_6/analysis/NetWAS/giant-api/client/python/giantapi.py", line 85, in init
json = r.json()
File "/home/monalisa6hota/.local/lib/python2.7/site-packages/requests/models.py", line 910, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python2.7/json/init.py", line 339, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 382, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded