Skip to content

TypeError: unsupported operand type(s) for |: 'type' and 'NoneType' #5

@diaoyitan

Description

@diaoyitan

when I import this package in python, an error happened. How to fix it?

TypeError Traceback (most recent call last)
Cell In[6], line 1
----> 1 import easySCFpy

File ~/.local/lib/python3.8/site-packages/easySCFpy/init.py:1
----> 1 from .load import loadH5
2 from .save import saveH5

File ~/.local/lib/python3.8/site-packages/easySCFpy/load.py:124
117 data[key] = item
118 return data
121 def read_h5_to_scanpy(
122 filename: Union[str, Path],
123 assay: str = "RNA",
--> 124 image_name: str | None = None,
125 backed: Union[Literal["r"], Literal["r+"], bool, None] = None,
126 *,
127 as_sparse: Sequence[str] = ("raw/X"),
128 as_sparse_fmt: type[sparse.spmatrix] = sparse.csr_matrix,
129 chunk_size: int = 6000,
130 ) -> AnnData:
132 if as_sparse_fmt not in (sparse.csr_matrix, sparse.csc_matrix):
133 raise NotImplementedError(
134 "Dense formats can only be read to CSR or CSC matrices at this time."
135 )

TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions