IndexError: list index out of range when running `sc.pp.neighbors(adata)`

Hi,
I’m getting the following stack trace when calling sc.pp.neighbors(adata). This is data derived from CosMx, through squidpy, and as far as I know it’s valid - I’ve been analysing it for a while now.
Python version is 3.12.4.
Would appreciate any ideas, thanks!

It’s quite a long trace…
https://paste.mozilla.org/aWzoUOFC

Could you please give us the output of pip list? Especially the numba versions etc are of interest.

Sure, this is the output of conda list:
https://paste.mozilla.org/4QssuEur

This happens with nanostring’s tutorial data as well:

import squidpy as sq
sample_dir = aux.P.data_dir / 'tutorial_data' / 'Lung5_Rep2/Lung5_Rep2-Flat_files_and_images/'
adata = sq.read.nanostring(
    path=sample_dir,
    counts_file="Lung5_Rep2_exprMat_file.csv",
    meta_file="Lung5_Rep2_metadata_file.csv",
    fov_file="Lung5_Rep2_fov_positions_file.csv",
)
adata = adata.copy() # defragment adata


#%%
sc.pp.normalize_total(adata, inplace=True)
sc.pp.log1p(adata)
sc.pp.highly_variable_genes(adata, min_mean=0.0125, max_mean=3, min_disp=0.5)
adata = adata[:, adata.var.highly_variable]
sc.tl.pca(adata)
sc.pp.neighbors(adata, n_neighbors=10, n_pcs=40)

Bump.
Am I the only one this happens to…?
I’ve tried with a clean conda env built around squidpy, and running with nanostring’s tutorial data. It looks like the error is coming from somewhere deep in sklearn’s KNN algorithm, but I’m getting the same with previous versions of sklearn as well.