MouseLand / suite2p

cell detection in calcium imaging recordings
http://www.suite2p.org
GNU General Public License v3.0
354 stars 241 forks source link

BUG: GUI not displaying any images or data visualisation #953

Closed scientist-in-pain closed 1 year ago

scientist-in-pain commented 1 year ago

Describe the issue:

Hi, thanks a lot for the wonderful package! It's worked well for me in the past, with previous versions. However, I have tried installing the most recent version on a new computer and there seems to be an issue with package incompatibility that causes the GUI to not display anything. From looking at the extracted traces, the backend works fine. I tried it with one of your example datasets, just to see if it was due to the way I formatted my data, I got the same error.

I tried editing it myself but it still didn't work, so I thought I would pass it on to some more competent programmers.

Any advice appreciated, thank you!

GUI_error

Reproduce the code example:

no code, error arising when loading stat.npy from the GUI

Error message:

Traceback (most recent call last):
  File "C:\Users\malin\anaconda3\envs\suite2p\lib\site-packages\suite2p\gui\rungui.py", line 439, in finished
    io.load_proc(self.parent)
  File "C:\Users\malin\anaconda3\envs\suite2p\lib\site-packages\suite2p\gui\io.py", line 307, in load_proc
    load_to_GUI(parent, basename, output)
  File "C:\Users\malin\anaconda3\envs\suite2p\lib\site-packages\suite2p\gui\io.py", line 332, in load_to_GUI
    make_masks_and_enable_buttons(parent)
  File "C:\Users\malin\anaconda3\envs\suite2p\lib\site-packages\suite2p\gui\io.py", line 49, in make_masks_and_enable_buttons
    yext, xext = utils.boundary(ypix, xpix)
  File "C:\Users\malin\anaconda3\envs\suite2p\lib\site-packages\suite2p\gui\utils.py", line 10, in boundary
    msk = np.zeros((np.ptp(ypix)+6, np.ptp(xpix)+6), np.bool)
  File "C:\Users\malin\anaconda3\envs\suite2p\lib\site-packages\numpy\__init__.py", line 305, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'bool'.
`np.bool` was a deprecated alias for the builtin `bool`. To avoid this error in existing code, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

Version information:

suite2p v0.12.1

Context for the issue:

It seems to me like a simple issue that would otherwise put off new users and stop them from getting into using suite2p.

chriski777 commented 1 year ago

Hi @scientist-in-pain, thanks for letting us know about this. This has been fixed in the latest version of the code on the refactor branch so you can work off that version if you'd like. An alternative to getting this to work for now would be to downgrade your numpy version to 1.23.3! I'll close this for now but feel free to re-open if you are still having problems!

Neuropharmacist commented 1 year ago

I have the same issue, but it doesn't seem to resolve by downgrading numpy to 1.23.3. Could you give some more advice to a newbie how to get the latest code running?