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

GLError - clusterview OK but waveforms or other views are not displayed #1117

Open YuNangoChen opened 2 years ago

YuNangoChen commented 2 years ago

Hi phy team,

I was going to do the soring with phy on my ''klustaed'' spikes but found whenever I chose the clusters, all the ''view'' windows are blank (see attached picture). Therefore I reinstalled the whole environment and the problem still occurred. I am using a computer with AMD graphic card for this. I also checked the phy.log, and found this error looping: 15:57:37.855 [D] base:702 Exception in paintGL: GLError( err = 1282, description = b'invalid operation', baseOperation = glClearColor, cArguments = (0, 0, 0, 10) ) 15:57:37.855 [D] base:675 Exception in initializetGL: GLError( err = 1282, description = b'invalid operation', baseOperation = glClearColor, cArguments = (0, 0, 0, 0)

Could you have a look and tell me what actions should be taken? Thanks!

YuNangoChen commented 2 years ago

Screenshot 2021-09-30 164345

julieelie commented 2 years ago

Hello @YuNangoChen and Phy Team,

I do have the same error and the same layout issue. I have been successfully installing and using Phy2 for 2 years until last spring but it's not working anymore now. My diagnosis is that between the spring and now, my MacOs was updated from Mojave to BigSur and that there might be OpenGL incompatibilities? Is the GLSL version (1.20?) called by Phy a version that is incompatible with the OpenGL version of MacOS BigSur (which would be 4.1 from what I read on the web)?

Please @rossant can you confirm whether Phy2 is compatible or not with BigSur? Is my only chance to keep using Phy2 to get a Linux box? Thank you for your help! I'm stuck with half of my data sorted with Phy2 and the rest of it waiting to be sorted :-\

The error Phy throws is:

base:675             Exception in initializetGL: GLError(
    err = 1280,
    description = b'invalid enumerant',
    baseOperation = glEnable,
    cArguments = (GL_POINT_SPRITE,)
)
Error in Vertex shader 558 (<string>)
 -> '' :  version '120' is not supported
julieelie commented 2 years ago

Note that I also tried to revert to previous versions of pyqt5 and pyqtwebengine. Specifically I tried versions 5.12 following the solution found for issue #1113 which I thought was related in the first place. Reverting to these earlier versions indeed rescued all the views BUT clusterView and similarity view.... Not sure if that helps in understanding what's going on!

vincisLab commented 2 years ago

Hello, we are experiecing the exact same issue with physiology and Mac with macOS Big Sur. The cluster view and similarity view are blank. You can click on them with the mouse and "blindly" change cluster, but obviously it is an issue. Any suggestion?

jjtukker commented 2 years ago

I have the same issue, getting either everything except ClusterView and SimilarityView, OR only those two views.. Also on a Mac, OS Big Sur 11.6 (Graphics AMD Radeon Pro 5500M 8 GB and Intel UHD Graphics 630 1536 MB). I'm actually running phy on an Ubuntu server and using x2go and XQuartz, but the fact that others can run phy from this same server makes me think this is a local issue related to my Mac.

Has anyone made any progress solving this issue?

Here is the terminal output I get (currently only getting the ClusterView and SimilarityView): (phy) john@alz1:~/spikesorting/Kilosort_2020-08-03_140330$ phy template-gui params.py 09:28:55.189 [W] model:591 Unreferenced clusters found in templates (generally not a problem) 09:28:55.231 [W] model:613 Unreferenced clusters found in spike_clusters (generally not a problem) 09:28:55.376 [W] model:655 Skipping spike waveforms that do not exist, they will be extracted on the fly from the raw data as needed. qt.qpa.xcb: X server does not support XInput 2 qt.qpa.xcb: QXcbConnection: XCB error: 1 (BadRequest), sequence: 169, resource id: 213, major code: 130 (Unknown), minor code: 47

In phy.log I get similar output as described above, lots of "Exception in PaintGL: Attempt to retrieve context when no valid context".

jjtukker commented 2 years ago

I still do not have a solution for this problem, but I would just like to report that updating the OS to Monterey (12.1) did NOT solve this problem. However, when I run phy on an Ubuntu server and use VNC viewer to connect with my Mac, it works! I am able to see all the windows. So to summarize:

I hope this helps someone figure out what is going on! Would be nice to be able to run phy locally on a Mac, particularly for those who do not have the option to use another machine.

farazmoradi commented 2 years ago

Hi everyone, I'm facing the same issue! Have you reached any solution? @jjtukker

JiilKim commented 2 years ago

I am having the exact same issue on my MacBook

jlassaortiz commented 2 years ago

I am having the same issue on my MacBook running macOS 12.2.1 (Monterey)

breadnbeer commented 2 years ago

I have the same issue on macOS Big Sur. Any solution yet?

shiralupkin commented 2 years ago

I just posted a potential solution (it worked for me, MacBook Pro running MacOS 12.2.1 (Monterey)) here: #1113

I have copied the response below. Hope this helps!!

Short Version I upgraded to python 3.9, installed phy as usual, then manually uninstalled/reinstalled pyqt and pyqtengine as per #1122 .

Details/Code

# create env
conda create -n spikeSorting python=3.9

# install phy
pip install phy --pre --upgrade

# uninstall/reinstall relevant libraries
pip uninstall pyqt5
pip uninstall pyqtwebengine
pip install PyQtWebEngine==5.15
pip install PyQt5==5.15
wanghgogo commented 2 years ago

I just posted a potential solution (it worked for me, MacBook Pro running MacOS 12.2.1 (Monterey)) here: #1113

I have copied the response below. Hope this helps!!

Short Version I upgraded to python 3.9, installed phy as usual, then manually uninstalled/reinstalled pyqt and pyqtengine as per #1122 .

Details/Code

# create env
conda create -n spikeSorting python=3.9

# install phy
pip install phy --pre --upgrade

# uninstall/reinstall relevant libraries
pip uninstall pyqt5
pip uninstall pyqtwebengine
pip install PyQtWebEngine==5.15
pip install PyQt5==5.15

I used annaconda environment for phy and this solution solved my blank clusterview/similarityview issue!

zjm199502 commented 1 year ago

I just posted a potential solution (it worked for me, MacBook Pro running MacOS 12.2.1 (Monterey)) here: #1113

I have copied the response below. Hope this helps!!

Short Version I upgraded to python 3.9, installed phy as usual, then manually uninstalled/reinstalled pyqt and pyqtengine as per #1122 .

Details/Code

# create env
conda create -n spikeSorting python=3.9

# install phy
pip install phy --pre --upgrade

# uninstall/reinstall relevant libraries
pip uninstall pyqt5
pip uninstall pyqtwebengine
pip install PyQtWebEngine==5.15
pip install PyQt5==5.15

I use a MacbookPro MacOS 13.0. This method make everything well!

Thank your so much for sharing this.