theislab / scvelo

RNA Velocity generalized through dynamical modeling
https://scvelo.org
BSD 3-Clause "New" or "Revised" License
417 stars 102 forks source link

Issue loading the pancreas dataset #422

Closed rvinas closed 3 years ago

rvinas commented 3 years ago

I cannot load the pancreas dataset:

import scvelo as scv
adata = scv.datasets.pancreas()

(please see the output of scv.logging.print_versions() below)

Error Traceback (most recent call last): File "/home/rv340/anaconda3/envs/pytorch38/lib/python3.8/site-packages/anndata/_io/utils.py", line 156, in func_wrapper return func(elem, *args, **kwargs) File "/home/rv340/anaconda3/envs/pytorch38/lib/python3.8/site-packages/anndata/_io/h5ad.py", line 469, in read_dataframe_legacy _decode_structured_array( File "/home/rv340/anaconda3/envs/pytorch38/lib/python3.8/site-packages/anndata/compat/__init__.py", line 112, in _decode_structured_array decode(arr[k], out=arr[k]) File "/home/rv340/anaconda3/envs/pytorch38/lib/python3.8/site-packages/anndata/compat/__init__.py", line 108, in decode = np.frompyfunc(lambda x: x.decode("utf-8"), 1, 1) AttributeError: 'str' object has no attribute 'decode' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "", line 1, in pancreas File "/home/rv340/anaconda3/envs/pytorch38/lib/python3.8/site-packages/scanpy/readwrite.py", line 112, in read return _read( File "/home/rv340/anaconda3/envs/pytorch38/lib/python3.8/site-packages/scanpy/readwrite.py", line 713, in _read return read_h5ad(filename, backed=backed) File "/home/rv340/anaconda3/envs/pytorch38/lib/python3.8/site-packages/anndata/_io/h5ad.py", line 424, in read_h5ad d[k] = read_dataframe(f[k]) File "/home/rv340/anaconda3/envs/pytorch38/lib/python3.8/site-packages/anndata/_io/utils.py", line 159, in func_wrapper raise e File "/home/rv340/anaconda3/envs/pytorch38/lib/python3.8/site-packages/anndata/_io/utils.py", line 156, in func_wrapper return func(elem, *args, **kwargs) File "/home/rv340/anaconda3/envs/pytorch38/lib/python3.8/site-packages/anndata/_io/h5ad.py", line 482, in read_dataframe return read_dataframe_legacy(group) File "/home/rv340/anaconda3/envs/pytorch38/lib/python3.8/site-packages/anndata/_io/utils.py", line 162, in func_wrapper raise AnnDataReadError( anndata._io.utils.AnnDataReadError: Above error raised while reading key '/obs' of type from /.

Versions:

scvelo==0.2.3 scanpy==1.7.1 anndata==0.7.5 loompy==3.0.6 numpy==1.19.2 scipy==1.6.2 matplotlib==3.3.3 sklearn==0.23.2 pandas==1.1.3

WeilerP commented 3 years ago

Sorry, I cannot replicate the error locally. Did you try running the code in a new, clean environment? Also, the problem seems to be not directly with scvelo but rather anndata. If you haven't already done so, I'd run the code in a new, clean environment and if the error still persists open an issue on the anndata repo.