pysradb icon indicating copy to clipboard operation
pysradb copied to clipboard

[BUG] gse-to-srp error

Open sumin5784 opened this issue 6 months ago • 1 comments

Hello,

I have list of GEO study accession IDs and need to extract SRA meta data. And I got several studies returned error message. Does anyone know what causes this issue?

These are the GSEs causing errors: GSE37005 GSE29714 GSE47217 GSE54365 GSE113801 GSE115106 GSE108333 GSE123527 GSE130894 GSE134964 GSE133600 GSE182269 GSE163140

To Reproduce Steps to reproduce the behavior: pysradb gse-to-srp GSE37005

Error message

Traceback (most recent call last):
  File "/ihome/yufeihuang/suj40/Downloads/enter/envs/pysradb/lib/python3.11/site-packages/requests/models.py", line 971, in json
    return complexjson.loads(self.text, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ihome/yufeihuang/suj40/Downloads/enter/envs/pysradb/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ihome/yufeihuang/suj40/Downloads/enter/envs/pysradb/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ihome/yufeihuang/suj40/Downloads/enter/envs/pysradb/lib/python3.11/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/ihome/yufeihuang/suj40/Downloads/enter/envs/pysradb/bin/pysradb", line 10, in <module>
    sys.exit(parse_args())
             ^^^^^^^^^^^^
  File "/ihome/yufeihuang/suj40/Downloads/enter/envs/pysradb/lib/python3.11/site-packages/pysradb/cli.py", line 1206, in parse_args
    gse_to_srp(args.gse_ids, args.saveto, args.detailed, args.desc, args.expand)
  File "/ihome/yufeihuang/suj40/Downloads/enter/envs/pysradb/lib/python3.11/site-packages/pysradb/cli.py", line 232, in gse_to_srp
    df = sradb.gse_to_srp(
         ^^^^^^^^^^^^^^^^^
  File "/ihome/yufeihuang/suj40/Downloads/enter/envs/pysradb/lib/python3.11/site-packages/pysradb/sraweb.py", line 793, in gse_to_srp
    srp_df = self.srx_to_srp(srx)
             ^^^^^^^^^^^^^^^^^^^^
  File "/ihome/yufeihuang/suj40/Downloads/enter/envs/pysradb/lib/python3.11/site-packages/pysradb/sraweb.py", line 977, in srx_to_srp
    srx_df = self.sra_metadata(srx, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ihome/yufeihuang/suj40/Downloads/enter/envs/pysradb/lib/python3.11/site-packages/pysradb/sraweb.py", line 415, in sra_metadata
    esummary_result = self.get_esummary_response("sra", srp)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ihome/yufeihuang/suj40/Downloads/enter/envs/pysradb/lib/python3.11/site-packages/pysradb/sraweb.py", line 309, in get_esummary_response
    response = _retry_response(self.base_url["esummary"], payload, "result")
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/ihome/yufeihuang/suj40/Downloads/enter/envs/pysradb/lib/python3.11/site-packages/pysradb/sraweb.py", line 46, in _retry_response
    response = request.json()
               ^^^^^^^^^^^^^^
  File "/ihome/yufeihuang/suj40/Downloads/enter/envs/pysradb/lib/python3.11/site-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)
requests.exceptions.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

Thanks for the help in advance!

sumin5784 avatar Dec 05 '23 06:12 sumin5784