sanbomics_scripts icon indicating copy to clipboard operation
sanbomics_scripts copied to clipboard

local variable 'id_length' referenced before assignment

Open xyin0918 opened this issue 1 year ago • 0 comments

Hi, Thank you for this tutorial! It is very useful and I have almost done. But I was trying to merge the data in the step: adata = scv.utils.merge(adata, ldata). I got this error: UnboundLocalError Traceback (most recent call last) Cell In[5], line 1 ----> 1 adata = scv.utils.merge(adata, ldata)

File ~/.local/lib/python3.9/site-packages/scvelo/core/_anndata.py:526, in merge(adata, ldata, copy, **kwargs) 524 if "id_length" in kwargs: 525 id_length = kwargs.get("id_length") --> 526 clean_obs_names(adata, id_length=id_length) 527 clean_obs_names(ldata, id_length=id_length) 528 common_obs = adata.obs_names.intersection(ldata.obs_names)

UnboundLocalError: local variable 'id_length' referenced before assignment Do you have any idea why this error happens? Thank u very much!

xyin0918 avatar May 02 '23 19:05 xyin0918