saketkc / pysradb

Package for fetching metadata and downloading data from SRA/ENA/GEO
https://saketkc.github.io/pysradb
BSD 3-Clause "New" or "Revised" License
303 stars 49 forks source link

[BUG] All arrays must be of the same length #215

Open Rohit-Satyam opened 4 months ago

Rohit-Satyam commented 4 months ago

Describe the bug Unable to run pysradb for GSE198257 To Reproduce Steps to reproduce the behavior:

## Installation: pip install git+https://github.com/saketkc/pysradb
pysradb gse-to-srp  GSE198257

Traceback (most recent call last):
  File "/home/subudhak/miniconda3/bin/pysradb", line 8, in <module>
    sys.exit(parse_args())
             ^^^^^^^^^^^^
  File "/home/subudhak/miniconda3/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 "/home/subudhak/miniconda3/lib/python3.11/site-packages/pysradb/cli.py", line 232, in gse_to_srp
    df = sradb.gse_to_srp(
         ^^^^^^^^^^^^^^^^^
  File "/home/subudhak/miniconda3/lib/python3.11/site-packages/pysradb/sraweb.py", line 799, in gse_to_srp
    new_gse_df = pd.DataFrame(
                 ^^^^^^^^^^^^^
  File "/home/subudhak/miniconda3/lib/python3.11/site-packages/pandas/core/frame.py", line 767, in __init__
    mgr = dict_to_mgr(data, index, columns, dtype=dtype, copy=copy, typ=manager)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/subudhak/miniconda3/lib/python3.11/site-packages/pandas/core/internals/construction.py", line 503, in dict_to_mgr
    return arrays_to_mgr(arrays, columns, index, dtype=dtype, typ=typ, consolidate=copy)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/subudhak/miniconda3/lib/python3.11/site-packages/pandas/core/internals/construction.py", line 114, in arrays_to_mgr
    index = _extract_index(arrays)
            ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/subudhak/miniconda3/lib/python3.11/site-packages/pandas/core/internals/construction.py", line 677, in _extract_index
    raise ValueError("All arrays must be of the same length")
ValueError: All arrays must be of the same length

Desktop (please complete the following information):