Skip to content

failure to convert attributeError: 'dict' object has no attribute 'dtype' #85

@Flu09

Description

@Flu09

sceasy::convertFormat(h5ad_file, from="anndata", to="seurat", outFile='neurons.rds')
Loading required namespace: Seurat
/home/sherine/R/x86_64-pc-linux-gnu-library/4.3/reticulate/python/rpytools/loader.py:117: FutureWarning: pandas.core.index is deprecated and will be removed in a future version. The public classes are available in the top-level namespace.
return find_and_load(name, import)

Error in py_call_impl(callable, call_args$unnamed, call_args$named) :
AttributeError: 'dict' object has no attribute 'dtype'
Run reticulate::py_last_error() for details.

reticulate::py_last_error()

── Python Exception Message ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Traceback (most recent call last):
File "/home/sherine/anaconda3/envs/sceasy_env/lib/python3.11/site-packages/anndata/readwrite/read.py", line 447, in read_h5ad
constructor_args = _read_args_from_h5ad(filename=filename, chunk_size=chunk_size)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sherine/anaconda3/envs/sceasy_env/lib/python3.11/site-packages/anndata/readwrite/read.py", line 502, in _read_args_from_h5ad
return AnnData._args_from_dict(d)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sherine/anaconda3/envs/sceasy_env/lib/python3.11/site-packages/anndata/core/anndata.py", line 2157, in _args_from_dict
if key in d_true_keys[true_key].dtype.names:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'dict' object has no attribute 'dtype'

── R Traceback ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

  1. └─sceasy::convertFormat(...)
  2. └─sceasy (local) func(obj, outFile = outFile, main_layer = main_layer, ...)
  3. └─anndata$read_h5ad(inFile)
    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions