MouseLand/suite2p

TypeError: model_path() in rungui.py on newly installed suite2p

IreneP19 opened this issue · 5 comments

Describe the issue:

Hi all,
I have just installed suite2p with gui on a windows machine with a newly installed anaconda distribution following the tutorial.
Suite2p gui starts and when I run suite2p with default settings on a tif file I get this error:

>python -m suite2p
loaded default ops
loading ops
Traceback (most recent call last):
  File "C:\ProgramData\Anaconda3\envs\suite2p\lib\site-packages\suite2p\gui\rungui.py", line 441, in run_S2P
    pretrained_model_path = model_path(pretrained_model_string, 0, True)
TypeError: model_path() takes from 1 to 2 positional arguments but 3 were given

I replicated the same error on a different windows machine after clean install of suite2p with gui.

Thanks for any support!

Provide environment info:

     active environment : suite2p
    active env location : C:\ProgramData\Anaconda3\envs\suite2p
            shell level : 2
       user config file : C:\Users\jarvis2P\.condarc
 populated config files : C:\Users\jarvis2P\.condarc
          conda version : 4.9.2
    conda-build version : 3.21.4
         python version : 3.7.7.final.0
       virtual packages : __cuda=11.2=0
                          __win=0=0
                          __archspec=1=x86_64
       base environment : C:\ProgramData\Anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/win-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/win-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://repo.anaconda.com/pkgs/msys2/win-64
                          https://repo.anaconda.com/pkgs/msys2/noarch
          package cache : C:\ProgramData\Anaconda3\pkgs
                          C:\Users\jarvis2P\.conda\pkgs
                          C:\Users\jarvis2P\AppData\Local\conda\conda\pkgs
       envs directories : C:\ProgramData\Anaconda3\envs
                          C:\Users\jarvis2P\.conda\envs
                          C:\Users\jarvis2P\AppData\Local\conda\conda\envs
               platform : win-64
             user-agent : conda/4.9.2 requests/2.24.0 CPython/3.7.7 Windows/10 Windows/10.0.19041
          administrator : True
             netrc file : None
           offline mode : False

We also get this error. We do not use Anat detect, so as a temp work around, modified rugui.py
Lib\site-packages\suite2p\gui\rugui.py
pretrained_model_path = model_path(pretrained_model_string, 0, True)
updated to: pretrained_model_path = model_path(pretrained_model_string, 0)

Hi, thanks for the feedback!
Actually I believe that the problem is in the updated versions of one of the dependencies, cellpose.
with pip install --force-reinstall -v "cellpose==2.3.2" it now works as intended.

Irene

Thanks Irene, yes you are right, reinstalling that version of cellpose worked for us as well!

thanks for sorting this out! @chriski777 can you please fix the cellpose version in the setup.py?

@carsen-stringer, rather than pinning the Cellpose version at 2.3.2 (which is a much earlier one than the current one v3.0.5), I think we should instead implement the fix @klab-buffalo suggested. This should make suite2p work fine with the latest version of cellpose. I'll make that change for now but let me know if you'd prefer we pin the setup.py to an earlier version of cellpose!