Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Error when Importing on Python 3.9 #130

Open
crsct opened this issue Nov 21, 2022 · 0 comments
Open

Import Error when Importing on Python 3.9 #130

crsct opened this issue Nov 21, 2022 · 0 comments

Comments

@crsct
Copy link
Contributor

crsct commented Nov 21, 2022

The current layout of the pl.py file is importing tss_enrichment_plot as tss_enrichment and tss_enrichment_score_plot as tss_enrichment_score which is not a viable import name, I imagine this has slipped through some cracks as my previous contribution has been left unnoticed for a year.

File episcanpy/api/pl.py:20
     18 from ..preprocessing._quality_control import cal_var, variability_features
     19 from ..preprocessing._tss_enrichment import tss_enrichment_plot as tss_enrichment
---> 20 from ..preprocessing._tss_enrichment import tss_enrichment_score_plot as tss_enrichment_score

ImportError: cannot import name 'tss_enrichment_score_plot' from 'episcanpy.preprocessing._tss_enrichment' (./episcanpy/preprocessing/_tss_enrichment.

Is it safe to simply change these lines like this?

-from ..preprocessing._tss_enrichment import tss_enrichment_plot as tss_enrichment
-from ..preprocessing._tss_enrichment import tss_enrichment_score_plot as tss_enrichment_score
+from ..preprocessing._tss_enrichment import tss_enrichment_plot 
+from ..preprocessing._tss_enrichment import tss_enrichment 

it does not seem to throw the error, testing is also successful, but I am still uncertain as I have no grasp over the code base and apparently the prior code also works.

Could someone fill me in how it was supposed to work?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant