scverse / squidpy

Spatial Single Cell Analysis in Python
https://squidpy.readthedocs.io/en/stable/
BSD 3-Clause "New" or "Revised" License
442 stars 82 forks source link

`_pickle.UnpicklingError: pickle data was truncated` running ligrec #865

Closed Rafael-Silva-Oliveira closed 3 months ago

Rafael-Silva-Oliveira commented 3 months ago

Hi, whenever I run this

res = sq.gr.ligrec(
    adata,
    n_perms=100,
    cluster_key="cell_type",
    copy=False,
    use_raw=False,
    transmitter_params={"categories": "ligand"},
    receiver_params={"categories": "receptor"},
)

I get the error:

    res = self._downloader.maybe_download(
  File "/mnt/work/RO_src/venv/stnav_venv/lib/python3.10/site-packages/omnipath/_core/downloader/_downloader.py", line 140, in maybe_download
    res = self._options.cache[key]
  File "/mnt/work/RO_src/venv/stnav_venv/lib/python3.10/site-packages/omnipath/_core/cache/_cache.py", line 101, in __getitem__
    return pickle.load(fin)
_pickle.UnpicklingError: pickle data was truncated

I already reinstalled omnipath and squidpy (1.6.0), but didn't work

Rafael-Silva-Oliveira commented 3 months ago

This worked:


import omnipath
omnipath.clear_cache()