Git Product home page Git Product logo

Comments (5)

martinkim0 avatar martinkim0 commented on August 17, 2024

Hi, what kind of import error are you getting?

from scvi-tools.

Sirin24 avatar Sirin24 commented on August 17, 2024

Thank you for your fast reply. I copied it below. I am not sure why when I try to import scvi it attempts to read an h5ad file.

[sir@lm602-20 scvi_folder]$ conda activate py-env
(/user/conda-environments/py-env) [sir@lm602-20 scvi_folder]$ python
Python 3.8.6 | packaged by conda-forge | (default, Oct 7 2020, 19:08:05)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import scanpy as sc
import scvi
Traceback (most recent call last):
File "/user/conda-environments/py-env/lib/python3.8/site-packages/anndata/_io/utils.py", line 156, in func_wrapper
return func(elem, *args, **kwargs)
File "/user/conda-environments/py-env/lib/python3.8/site-packages/anndata/_io/h5ad.py", line 510, in read_group
EncodingVersions[encoding_type].check(
File "/user/conda-environments/py-env/lib/python3.8/enum.py", line 355, in getitem
return cls.member_map[name]
KeyError: 'dict'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "", line 1, in
File "/user/brainref/scvi_folder/scvi.py", line 5, in
ref_adata=sc.read_h5ad('/user/brainref/a5463d8f-07df-4870-8cae-bc504de762c8.h5ad')
File "/user/conda-environments/py-env/lib/python3.8/site-packages/anndata/_io/h5ad.py", line 413, in read_h5ad
d[k] = read_attribute(f[k])
File "/user/conda-environments/py-env/lib/python3.8/functools.py", line 875, in wrapper
return dispatch(args[0].class)(*args, **kw)
File "/user/conda-environments/py-env/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 '/layers' of type <class 'h5py._hl.group.Group'> from /.

from scvi-tools.

martinkim0 avatar martinkim0 commented on August 17, 2024

What version of scvi-tools is it installing? We don't support Python 3.8 in our latest versions. This might be the source of the issue, I'd recommend making sure that you're installing scvi-tools>=1.1.0

from scvi-tools.

canergen avatar canergen commented on August 17, 2024

It says that you have a file called scvi in your folder. Please rename this file: /user/brainref/scvi_folder/scvi.py. Local files have a higher priority during import than installed modules.

from scvi-tools.

canergen avatar canergen commented on August 17, 2024

To add, you currently can't read this file as there is a version conflict between anndata (likely your current environment has an older version of anndata than the one used to create the file).

from scvi-tools.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.