dandelion
dandelion copied to clipboard
Backports error
Description of the bug
When running session_info.show()
when dandelion has been imported raises an error:
Cell In[2], line 2
1 #Output session Info
----> 2 session_info.show()
File ~/rds/hpc-work/conda_envs/new_bio/lib/python3.11/site-packages/session_info/main.py:209, in show(na, os, cpu, jupyter, dependencies, std_lib, private, write_req_file, req_file_name, html, excludes)
207 for mod_name in clean_modules:
208 mod_names.append(mod_name)
--> 209 mod = sys.modules[mod_name]
210 # Since modules use different attribute names to store version info,
211 # try the most common ones.
212 try:
KeyError: 'backports'
Minimal reproducible example
#Standard Imports:
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib as mpl
import scanpy as sc
import dandelion as ddl
import pingouin as pg
import session_info
#Output session Info
session_info.show()
The error message produced by the code above
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
Cell In[2], line 2
1 #Output session Info
----> 2 session_info.show()
File ~/rds/hpc-work/conda_envs/new_bio/lib/python3.11/site-packages/session_info/main.py:209, in show(na, os, cpu, jupyter, dependencies, std_lib, private, write_req_file, req_file_name, html, excludes)
207 for mod_name in clean_modules:
208 mod_names.append(mod_name)
--> 209 mod = sys.modules[mod_name]
210 # Since modules use different attribute names to store version info,
211 # try the most common ones.
212 try:
KeyError: 'backports'
OS information
HPC cluster
Version information
scanpy==1.10.3 anndata==0.10.8 umap==0.5.6 numpy==2.0.2 scipy==1.14.1 pandas==2.2.3 scikit-learn==1.5.2 statsmodels==0.14.3 igraph==0.11.6 pynndescent==0.5.13
dandelion==0.3.8 pandas==2.2.3 numpy==1.26.4 matplotlib==3.9.2 networkx==3.3 scipy==1.14.1
Additional context
This is definitely caused only if importing dandelion. I have worked through each import and run session_info.show() and do not get this error until dandelion is imported.