BUG: UnboundLocalError: local variable 'meanImg_chan2' referenced before assignment
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
Hi,
I am also running into the same error, may I ask how did you end up solving it?
Thank you!