Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

local variable 'id_length' referenced before assignment #15

Open
xyin0918 opened this issue May 2, 2023 · 0 comments
Open

local variable 'id_length' referenced before assignment #15

xyin0918 opened this issue May 2, 2023 · 0 comments

Comments

@xyin0918
Copy link

xyin0918 commented May 2, 2023

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant