SystemError: /home/conda/feedstock_root/build_artifacts/python-split_1625973859697/work/Objects/listobject.c:138: bad argument to internal function
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 779
- Avg merge
- 1d 4h
- Merged PRs (30d)
- 27
Description
- I have checked that this issue has not already been reported.
- I have confirmed this bug exists on the latest version of scanpy.
- (optional) I have confirmed this bug exists on the master branch of scanpy.
Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.
Minimal code sample (that we can copy&paste without having any data)
import numpy as np
import pandas as pd
import scanpy as sc
import os
import sys
data = sc.read("data_bbknn_umap.h5ad")
sc.tl.louvain(data,resolution=res)
Traceback (most recent call last):
File "/home/scanpy/12.bbknn0814-4/bbknn2.py", line 27, in <module>
sc.tl.louvain(dat_merge,resolution=res)
File "/home/scanpy/miniconda3/envs/SC2/lib/python3.9/site-packages/scanpy/tools/_louvain.py", line 132, in louvain
g = _utils.get_igraph_from_adjacency(adjacency, directed=directed)
File "/home/scanpy/miniconda3/envs/SC2/lib/python3.9/site-packages/scanpy/_utils/__init__.py", line 219, in get_igraph_from_adjacency
g.es['weight'] = weights
SystemError: /home/conda/feedstock_root/build_artifacts/python-split_1625973859697/work/Objects/listobject.c:138: bad argument to internal function
Versions
[Paste the output of scanpy.logging.print_versions() leaving a blank line after the details tag]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at scanpy/tools/_louvain.py and follow the call into scanpy/_utils/init.py, especially get_igraph_from_adjacency where the traceback reports the failure. Reproduce the issue with the referenced data_bbknn_umap.h5ad input and collect the missing scanpy.logging.print_versions() output; completion requires a reproducible cause and confirmed resolution.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- bioinformatics
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 22/100