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

BUG: UnboundLocalError: local variable 'meanImg_chan2' referenced before assignment #1133

Open
GiangTranHU opened this issue Jul 4, 2024 · 0 comments

Comments

@GiangTranHU
Copy link

Describe the issue:

Dear all,
I have tried suite2p and I got the following error, would anyone please give me a tip how to solve it?
Thank you very much!

UnboundLocalError Traceback (most recent call last)
Cell In[23], line 1
----> 1 output_ops = suite2p.run_s2p(ops=ops, db=db)

File c:\users\giang\suite2p\suite2p\run_s2p.py:559, in run_s2p(ops, db, server)
557 if len(ops_paths) > 1 and ops["combined"] and ops.get("roidetect", True):
558 print("Creating combined view")
--> 559 io.combined(save_folder, save=True)
561 # save to NWB
562 if ops.get("save_NWB"):

File c:\users\giang\suite2p\suite2p\io\save.py:181, in combined(save_folder, save)
179 ii += 1
180 print("appended plane %d to combined view" % k)
--> 181 print(meanImg_chan2.shape)
182 ops["meanImg"] = meanImg
183 ops["meanImgE"] = meanImgE

UnboundLocalError: local variable 'meanImg_chan2' referenced before assignment

Reproduce the code example:

ops = suite2p.default_ops()
ops = {
    'diameter': 20,  
    'connected': True,  
    'do_bidiphase': False, 
    'cell_prob': 0.8,  
    'spatial_scale': 0.5,  
    'max_overlap': 0.8,  
    'nplanes' : 2
}
print(ops)

Error message:

No response

Version information:

Version: suite2p v0.14.5.dev3+gc88e1ba

Context for the issue:

No response

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