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

Blank ClusterView and SimilarityView #1143

Closed AntonioST closed 1 year ago

AntonioST commented 2 years ago

Hi,

I got some problem to start with a template-gui on my kilosort result. The ClusterView and SimilarityView didn't show anything. No mater how long I wait, it didn't change the blank content. If I tried to close the window, a timeout dialog pop up.

Screenshot_2022-03-11_19-43-55

Here are the part of packages installed in my conda environment.

# Name                    Version                   Build  Channel
pyqt5                     5.15.5                   pypi_0    pypi
pyqt5-qt                  5.15.2                   pypi_0    pypi
pyqt5-qt5                 5.15.2                   pypi_0    pypi
pyqt5-sip                 12.9.1                   pypi_0    pypi
pyqtwebengine             5.15.5                   pypi_0    pypi
pyqtwebengine-qt          5.15.2                   pypi_0    pypi
pyqtwebengine-qt5         5.15.2                   pypi_0    pypi
pytest-qt                 3.2.2                    pypi_0    pypi
qtconsole                 4.5.5                    pypi_0    pypi
phy                       2.0a1                    pypi_0    pypi
phylib                    2.4.1                    pypi_0    pypi

I guess it is something relate to the QtWebEngine which js wasn't run.

Thanks

AliyaAbl commented 2 years ago

I have the same problem. Have you found a solution to this?

AntonioST commented 2 years ago

Hi @AliyaAbl

I don't the real reason why qtwebengine is unable to show html content, but this command works on my linux computer env QTWEBENGINE_CHROMIUM_FLAGS="--single-process" phy template-gui .../params.py.

Screenshot_2022-03-18_14-29-46

I just find out this way this morning. I tried a simple QWebEngineView example with conda Qt (pyqtwebengine-qt 5.15.2 from conda pypi chanel), and my OS Qt (python-pyqt5-webengine-5.15.5-4 from archlinux). I have no such issue with my OS Qt.

abhijithkrishnan93 commented 2 years ago

I have the same problem and this @AntonioST solution works.

a-zmz commented 2 years ago

had the same issue, and solution from @AntonioST works for me too, thanks!

alejoe91 commented 1 year ago

Hi @AliyaAbl

I don't the real reason why qtwebengine is unable to show html content, but this command works on my linux computer env QTWEBENGINE_CHROMIUM_FLAGS="--single-process" phy template-gui .../params.py.

Screenshot_2022-03-18_14-29-46

I just find out this way this morning. I tried a simple QWebEngineView example with conda Qt (pyqtwebengine-qt 5.15.2 from conda pypi chanel), and my OS Qt (python-pyqt5-webengine-5.15.5-4 from archlinux). I have no such issue with my OS Qt.

@rossant could you add this to the Troubleshoot section?

KBillel commented 1 year ago

Worked for me as well thank you !

Datamance commented 1 year ago

@AntonioST You are a lifesaver! Thank you.

Coglet00 commented 8 months ago

hey i am a bit inexperienced but where should i write the env QTWEBENGINE_CHROMIUM_FLAGS="--single-process" phy template-gui .../params.py. command exactly?

rory-bedford commented 8 months ago

Hey @Coglet00, I'm guessing you're on linux?

In bash, you can define an environment variable for the execution of a specific command by putting it before the command. So in this case, we're setting QTWEBENGINE_CHROMIUM_FLAGS to "--single-process", then just running the usual command 'phy template-gui params.py'. The env bit at the start shouldn't matter much (it just runs the command in a clean environment). So in your terminal, navigate to the phy data directory, make sure it has params.py in your current directory, then run the command (don't actually put the .../ at the start).

Coglet00 commented 8 months ago

thanks for the reply!! i already have a separate environment for phy2 and i always open phy in the environment.

i always navigate to the params.py folder and write env QTWEBENGINE_CHROMIUM_FLAGS="--single-process" and then phy template-gui params.py

surprisingly my cluster view are still empty but when i drag and hold my mouse i get the output . but it goes away when i leave the mouse

rory-bedford commented 8 months ago

Just to clarify is that on the same line? So your full command should be:

QTWEBENGINE_CHROMIUM_FLAGS="--single-process" phy template-gui params.py

If you run them on different lines the environment variable QTWEBENGINE_CHROMIUM_FLAGS won't get saved for when you run the next command.

Sorry if this is pedantic just checking though!

Also worth trying without env in front - I don't think it should be used here (see https://stackoverflow.com/questions/13998075/setting-environment-variable-for-one-program-call-in-bash-using-env)