scverse / scverse/scanpy

SystemError: /home/conda/feedstock_root/build_artifacts/python-split_1625973859697/work/Objects/listobject.c:138: bad argument to internal function

Open
#1,980 2 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.