theislab / cellrank

CellRank: dynamics from multi-view single-cell data
https://cellrank.org
BSD 3-Clause "New" or "Revised" License
351 stars 46 forks source link

ImportError: cannot import name 'deprecated_arg_names' from 'scanpy._utils' since scanpy 1.10.0 release #1183

Closed Zethson closed 7 months ago

Zethson commented 8 months ago

ImportError Traceback (most recent call last) Cell In[2], line 3 1 import ehrapy as ep 2 from matplotlib import rcParams ----> 3 import cellrank as cr 4 import numpy as np

File /opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/cellrank/init.py:3 1 from importlib import metadata ----> 3 from cellrank import datasets, estimators, kernels, logging, models, pl 4 from cellrank._utils._lineage import Lineage 5 from cellrank.settings import settings

File /opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/cellrank/pl/init.py:2 1 from cellrank.pl._aggregate_fate_probs import aggregate_fate_probabilities ----> 2 from cellrank.pl._circular_projection import circular_projection 3 from cellrank.pl._cluster_trends import cluster_trends 4 from cellrank.pl._gene_trend import gene_trends

File /opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/cellrank/pl/_circular_projection.py:17 14 from matplotlib.colors import LinearSegmentedColormap, LogNorm 16 from anndata import AnnData ---> 17 from scanpy._utils import deprecated_arg_names 19 from cellrank import logging as logg 20 from cellrank._utils import Lineage

ImportError: cannot import name 'deprecated_arg_names' from 'scanpy._utils' (/opt/hostedtoolcache/Python/3.11.8/x64/lib/python3.11/site-packages/scanpy/_utils/init.py)

Zethson commented 8 months ago

Got removed with https://github.com/scverse/scanpy/commit/266c054e1c3b0f965863a6ee1fff1dc8d77bd5b9

erzakiev commented 8 months ago

Yes... As a temp measure downgrading to scanpy=1.9.8 seems to work..

jwalewski commented 7 months ago

Hey all,

When I was working on a separate issue I found that if you simply comment out the line that attempts to import deprecated_arg_names from scanpy._utils the rest of the code runs fine.

Since this is just a warning about which function names are deprecated, I think this is a decent solution for now (especially since no downgrades are needed).

jwalewski commented 7 months ago

Possibly related...

When attempting to predict the terminal states for my samples I noticed that, if one attempts to print the `names variable petscpy has an error:

[0]PETSC ERROR: ------------------------------------------------------------------------
[0]PETSC ERROR: Caught signal number 13 Broken Pipe: Likely while reading or writing to a socket
[0]PETSC ERROR: Try option -start_in_debugger or -on_error_attach_debugger
[0]PETSC ERROR: or see https://petsc.org/release/faq/#valgrind and https://petsc.org/release/faq/
[0]PETSC ERROR: configure using --with-debugging=yes, recompile, link, and run
[0]PETSC ERROR: to get more information on the crash.
Abort(59) on node 0 (rank 0 in comm 0): application called MPI_Abort(MPI_COMM_WORLD, 59) - process 0

Authors (@michalk8), if you'd like to have me post a separate issue since this is a different package please let me know.

dawe commented 7 months ago

@jwalewski

Hey all,

When I was working on a separate issue I found that if you simply comment out the line that attempts to import deprecated_arg_names from scanpy._utils the rest of the code runs fine.

At the moment commenting out lines 17 and 72 from file cellrank/pl/_circular_projection.py seems to work

michalk8 commented 7 months ago

closed via #1184