cortex-lab / phy

phy: interactive visualization and manual spike sorting of large-scale ephys data
BSD 3-Clause "New" or "Revised" License
311 stars 157 forks source link

ImportError: cannot import name 'Selector' from 'phylib.io.array' #1110

Closed yoonbai closed 2 years ago

yoonbai commented 3 years ago

I get this error after re-installing conda & phy. I tried changing the 'Selector' class definition (phylib.io.array) to 'SpikeSelector' but ran into additional issues. Perhaps there is a mismatch b/w phy & phylib versions?

I'm seeing similar issues under a closed thread as well.

Thanks for looking into this!

mariehemelt commented 3 years ago

I am also having this problem. Thanks for any ideas!

meszena commented 2 years ago

I have the same situation. But there are active commits going on at the moment. I think it will be resolved soon, it should be just some version conflict.

meszena commented 2 years ago

ImportError: DLL load failed Oops, now I've got another error, did it change for you too?

_File "c:\users\mesze.conda\envs\phy2\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\users\mesze.conda\envs\phy2\lib\runpy.py", line 85, in _run_code exec(code, runglobals) File "C:\Users\mesze.conda\envs\phy2\Scripts\phy.exe__main.py", line 4, in File "c:\users\mesze.conda\envs\phy2\lib\site-packages\phy\apps\init.py", line 22, in from phy.gui.qt import QtDialogLogger File "c:\users\mesze.conda\envs\phy2\lib\site-packages\phy\gui\init__.py", line 6, in from .qt import ( File "c:\users\mesze.conda\envs\phy2\lib\site-packages\phy\gui\qt.py", line 31, in from PyQt5.QtCore import (Qt, QByteArray, QMetaObject, QObject, # noqa ImportError: DLL load failed: The specified procedure could not be found.

mariehemelt commented 2 years ago

No, mine still looks the same today:

(phy2) C:\Users\mh553\TempFromIsilonQ\TotalSort>phy template-gui params.py Traceback (most recent call last): File "c:\users\mh553\anaconda3\envs\phy2\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "c:\users\mh553\anaconda3\envs\phy2\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\mh553\Anaconda3\envs\phy2\Scripts\phy.exe__main.py", line 4, in File "c:\users\mh553\anaconda3\envs\phy2\lib\site-packages\phy\apps\init__.py", line 25, in from .base import ( # noqa File "c:\users\mh553\anaconda3\envs\phy2\lib\site-packages\phy\apps\base.py", line 22, in from phylib.io.array import Selector, _flatten ImportError: cannot import name 'Selector' from 'phylib.io.array' (c:\users\mh553\anaconda3\envs\phy2\lib\site-packages\phylib\io\array.py)

juliecharlton commented 2 years ago

I still get the same error (mine is for 'Selector' instead of 'spikeSelector'

_Traceback (most recent call last): File "/Users/gorislab/opt/anaconda3/envs/phy2/bin/phy", line 5, in from phy.apps import phycli File "/Users/gorislab/opt/anaconda3/envs/phy2/lib/python3.7/site-packages/phy/apps/init.py", line 25, in from .base import ( # noqa File "/Users/gorislab/opt/anaconda3/envs/phy2/lib/python3.7/site-packages/phy/apps/base.py", line 22, in from phylib.io.array import Selector, flatten ImportError: cannot import name 'Selector' from 'phylib.io.array' (/Users/gorislab/opt/anaconda3/envs/phy2/lib/python3.7/site-packages/phylib/io/array.py)

juliecharlton commented 2 years ago

I found a very hacky solution that seems to work. I went into phy2/lib/python3.7/site-packages/phy and manually replaced all of the code that's been updated recently (<2 years old) with the code from github.

yoonbai commented 2 years ago

LOL Thanks, Julie! Hope phy & phylib branches sync up again.

Feikai-Lin commented 2 years ago

I found a very hacky solution that seems to work. I went into phy2/lib/python3.7/site-packages/phy and manually replaced all of the code that's been updated recently (<2 years old) with the code from github.

This is helpful! I download phy-master from github and replace the original phy (phy2/lib/python3.7/site-packages/phy) with the updated phy from phy-master. It seems to solve this issue.

rossant commented 2 years ago

Hopefully this should be fixed with the latest phy beta release, feel free to reopen if not

Jungsugiee commented 1 year ago

Hi, I am experiencing the same issue even though I relpaced the files. The error persisted. Do you know a solution to this?