cortex-lab / phy

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

numpy broken and empty interface on Linux #1207

Closed rat-h closed 1 year ago

rat-h commented 1 year ago

Linux Ubuntu-like with KDE

<ws>:~/.local/apps$ python --version
Python 3.10.6
<ws>:~/.local/apps$ qmake --version
QMake version 3.1
Using Qt version 5.15.3 in /usr/lib/x86_64-linux-gnu

Virtual environment

<ws>:~/.local/apps$ python -m venv phy
<ws>:~/.local/apps$ source phy/bin/activate
(phy) <ws>:~/.local/apps$ pip install phy --pre --upgrade
Collecting phy
  Using cached phy-2.0b5-py2.py3-none-any.whl
Collecting requests
  Using cached requests-2.29.0-py3-none-any.whl (62 kB)
Collecting scipy
  Using cached scipy-1.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.4 MB)
Collecting click
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting qtconsole
  Using cached qtconsole-5.4.2-py3-none-any.whl (121 kB)
Collecting mtscomp
  Using cached mtscomp-1.0.2-py2.py3-none-any.whl (16 kB)
Collecting PyQtWebEngine
  Using cached PyQtWebEngine-5.15.6-cp37-abi3-manylinux1_x86_64.whl (230 kB)
Collecting matplotlib
  Using cached matplotlib-3.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.6 MB)
Collecting dask
  Using cached dask-2023.4.1-py3-none-any.whl (1.2 MB)
Collecting PyQt5
  Using cached PyQt5-5.15.9-cp37-abi3-manylinux_2_17_x86_64.whl (8.4 MB)
Collecting pillow
  Using cached Pillow-9.5.0-cp310-cp310-manylinux_2_28_x86_64.whl (3.4 MB)
Collecting tqdm
  Using cached tqdm-4.65.0-py3-none-any.whl (77 kB)
Collecting h5py
  Using cached h5py-3.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB)
Collecting numpy
  Using cached numpy-1.24.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.3 MB)
Collecting colorcet
  Using cached colorcet-3.0.1-py2.py3-none-any.whl (1.7 MB)
Collecting joblib
  Using cached joblib-1.2.0-py3-none-any.whl (297 kB)
Collecting pyopengl
  Using cached PyOpenGL-3.1.6-py3-none-any.whl (2.4 MB)
Collecting mkdocs
  Using cached mkdocs-1.4.2-py3-none-any.whl (3.7 MB)
Collecting phylib
  Using cached phylib-2.4.3-py2.py3-none-any.whl (80 kB)
Collecting cython
  Using cached Cython-3.0.0b2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.6 MB)
Collecting pyct>=0.4.4
  Using cached pyct-0.5.0-py2.py3-none-any.whl (15 kB)
Collecting toolz>=0.10.0
  Using cached toolz-0.12.0-py3-none-any.whl (55 kB)
Collecting packaging>=20.0
  Using cached packaging-23.1-py3-none-any.whl (48 kB)
Collecting partd>=1.2.0
  Using cached partd-1.4.0-py3-none-any.whl (18 kB)
Collecting pyyaml>=5.3.1
  Using cached PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (682 kB)
Collecting importlib-metadata>=4.13.0
  Using cached importlib_metadata-6.6.0-py3-none-any.whl (22 kB)
Collecting cloudpickle>=1.5.0
  Using cached cloudpickle-2.2.1-py3-none-any.whl (25 kB)
Collecting fsspec>=2021.09.0
  Using cached fsspec-2023.4.0-py3-none-any.whl (153 kB)
Collecting contourpy>=1.0.1
  Using cached contourpy-1.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (300 kB)
Collecting pyparsing>=2.3.1
  Using cached pyparsing-3.1.0b1-py3-none-any.whl (102 kB)
Collecting kiwisolver>=1.0.1
  Using cached kiwisolver-1.4.4-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.6 MB)
Collecting python-dateutil>=2.7
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting cycler>=0.10
  Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting fonttools>=4.22.0
  Using cached fonttools-4.39.3-py3-none-any.whl (1.0 MB)
Collecting markdown<3.4,>=3.2.1
  Using cached Markdown-3.3.7-py3-none-any.whl (97 kB)
Collecting ghp-import>=1.0
  Using cached ghp_import-2.1.0-py3-none-any.whl (11 kB)
Collecting mergedeep>=1.3.4
  Using cached mergedeep-1.3.4-py3-none-any.whl (6.4 kB)
Collecting jinja2>=2.11.1
  Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting pyyaml-env-tag>=0.1
  Using cached pyyaml_env_tag-0.1-py3-none-any.whl (3.9 kB)
Collecting watchdog>=2.0
  Using cached watchdog-3.0.0-py3-none-manylinux2014_x86_64.whl (82 kB)
Collecting PyQt5-sip<13,>=12.11
  Using cached PyQt5_sip-12.12.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl (360 kB)
Collecting PyQt5-Qt5>=5.15.2
  Using cached PyQt5_Qt5-5.15.2-py3-none-manylinux2014_xphy template-gui params.py 
15:45:39.332 [W] model:603            Unreferenced clusters found in templates (generally not a problem)
15:45:39.333 [W] model:625            Unreferenced clusters found in spike_clusters (generally not a problem)
15:45:39.337 [W] model:667            Skipping spike waveforms that do not exist, they will be extracted on the fly from the raw data as needed.
15:45:39.338 [W] model:55             133/4489 values are nan in /home/rth/Rhythm_FPGA-100.0-ks2.5/similar_templates.npy, replacing by zero.

86_64.whl (59.9 MB)
Collecting PyQtWebEngine-Qt5>=5.15.0
  Using cached PyQtWebEngine_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl (67.5 MB)
Collecting jupyter-core
  Using cached jupyter_core-5.3.0-py3-none-any.whl (93 kB)
Collecting jupyter-client>=4.1
  Using cached jupyter_client-8.2.0-py3-none-any.whl (103 kB)
Collecting ipython-genutils
  Using cached ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)
Collecting pygments
  Using cached Pygments-2.15.1-py3-none-any.whl (1.1 MB)
Collecting qtpy>=2.0.1
  Using cached QtPy-2.3.1-py3-none-any.whl (84 kB)
Collecting traitlets!=5.2.1,!=5.2.2
  Using cached traitlets-5.9.0-py3-none-any.whl (117 kB)
Collecting ipykernel>=4.1
  Using cached ipykernel-6.22.0-py3-none-any.whl (149 kB)
Collecting pyzmq>=17.1
  Using cached pyzmq-25.0.2-cp310-cp310-manylinux_2_28_x86_64.whl (1.1 MB)
Collecting idna<4,>=2.5
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.15-py2.py3-none-any.whl (140 kB)
Collecting charset-normalizer<4,>=2
  Using cached charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (199 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2022.12.7-py3-none-any.whl (155 kB)
Collecting zipp>=0.5
  Using cached zipp-3.15.0-py3-none-any.whl (6.8 kB)
Collecting debugpy>=1.6.5
  Using cached debugpy-1.6.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)
Collecting comm>=0.1.1
  Using cached comm-0.1.3-py3-none-any.whl (6.6 kB)
Collecting tornado>=6.1
  Using cached tornado-6.3.1-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (426 kB)
Collecting psutil
  Using cached psutil-5.9.5-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (282 kB)
Collecting ipython>=7.23.1
  Using cached ipython-8.13.1-py3-none-any.whl (797 kB)
Collecting matplotlib-inline>=0.1
  Using cached matplotlib_inline-0.1.6-py3-none-any.whl (9.4 kB)
Collecting nest-asyncio
  Using cached nest_asyncio-1.5.6-py3-none-any.whl (5.2 kB)
Collecting MarkupSafe>=2.0
  Using cached MarkupSafe-2.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting platformdirs>=2.5
  Using cached platformdirs-3.5.0-py3-none-any.whl (15 kB)
Collecting locket
  Using cached locket-1.0.0-py2.py3-none-any.whl (4.4 kB)
Collecting param>=1.7.0
  Using cached param-1.13.0-py2.py3-none-any.whl (87 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting backcall
  Using cached backcall-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting prompt-toolkit!=3.0.37,<3.1.0,>=3.0.30
  Using cached prompt_toolkit-3.0.38-py3-none-any.whl (385 kB)
Collecting pickleshare
  Using cached pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Collecting stack-data
  Using cached stack_data-0.6.2-py3-none-any.whl (24 kB)
Collecting pexpect>4.3
  Using cached pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
Collecting decorator
  Using cached decorator-5.1.1-py3-none-any.whl (9.1 kB)
Collecting jedi>=0.16
  Using cached jedi-0.18.2-py2.py3-none-any.whl (1.6 MB)
Collecting parso<0.9.0,>=0.8.0
  Using cached parso-0.8.3-py2.py3-none-any.whl (100 kB)
Collecting ptyprocess>=0.5
  Using cached ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Collecting wcwidth
  Using cached wcwidth-0.2.6-py2.py3-none-any.whl (29 kB)
Collecting executing>=1.2.0
  Using cached executing-1.2.0-py2.py3-none-any.whl (24 kB)
Collecting pure-eval
  Using cached pure_eval-0.2.2-py3-none-any.whl (11 kB)
Collecting asttokens>=2.1.0
  Using cached asttokens-2.2.1-py2.py3-none-any.whl (26 kB)
Installing collected packages: wcwidth, PyQtWebEngine-Qt5, PyQt5-Qt5, pyopengl, pure-eval, ptyprocess, pickleshare, mtscomp, ipython-genutils, executing, backcall, zipp, watchdog, urllib3, traitlets, tqdm, tornado, toolz, six, pyzmq, pyyaml, PyQt5-sip, pyparsing, pygments, psutil, prompt-toolkit, platformdirs, pillow, pexpect, parso, param, packaging, numpy, nest-asyncio, mergedeep, MarkupSafe, markdown, locket, kiwisolver, joblib, idna, fsspec, fonttools, decorator, debugpy, cython, cycler, cloudpickle, click, charset-normalizer, certifi, scipy, requests, qtpy, pyyaml-env-tag, python-dateutil, PyQt5, pyct, partd, matplotlib-inline, jupyter-core, jinja2, jedi, importlib-metadata, h5py, contourpy, comm, asttokens, stack-data, PyQtWebEngine, matplotlib, jupyter-client, ghp-import, dask, colorcet, phylib, mkdocs, ipython, ipykernel, qtconsole, phy
Successfully installed MarkupSafe-2.1.2 PyQt5-5.15.9 PyQt5-Qt5-5.15.2 PyQt5-sip-12.12.1 PyQtWebEngine-5.15.6 PyQtWebEngine-Qt5-5.15.2 asttokens-2.2.1 backcall-0.2.0 certifi-2022.12.7 charset-normalizer-3.1.0 click-8.1.3 cloudpickle-2.2.1 colorcet-3.0.1 comm-0.1.3 contourpy-1.0.7 cycler-0.11.0 cython-3.0.0b2 dask-2023.4.1 debugpy-1.6.7 decorator-5.1.1 executing-1.2.0 fonttools-4.39.3 fsspec-2023.4.0 ghp-import-2.1.0 h5py-3.8.0 idna-3.4 importlib-metadata-6.6.0 ipykernel-6.22.0 ipython-8.13.1 ipython-genutils-0.2.0 jedi-0.18.2 jinja2-3.1.2 joblib-1.2.0 jupyter-client-8.2.0 jupyter-core-5.3.0 kiwisolver-1.4.4 locket-1.0.0 markdown-3.3.7 matplotlib-3.7.1 matplotlib-inline-0.1.6 mergedeep-1.3.4 mkdocs-1.4.2 mtscomp-1.0.2 nest-asyncio-1.5.6 numpy-1.24.3 packaging-23.1 param-1.13.0 parso-0.8.3 partd-1.4.0 pexpect-4.8.0 phy-2.0b5 phylib-2.4.3 pickleshare-0.7.5 pillow-9.5.0 platformdirs-3.5.0 prompt-toolkit-3.0.38 psutil-5.9.5 ptyprocess-0.7.0 pure-eval-0.2.2 pyct-0.5.0 pygments-2.15.1 pyopengl-3.1.6 pyparsing-3.1.0b1 python-dateutil-2.8.2 pyyaml-6.0 pyyaml-env-tag-0.1 pyzmq-25.0.2 qtconsole-5.4.2 qtpy-2.3.1 requests-2.29.0 scipy-1.10.1 six-1.16.0 stack-data-0.6.2 toolz-0.12.0 tornado-6.3.1 tqdm-4.65.0 traitlets-5.9.0 urllib3-1.26.15 watchdog-3.0.0 wcwidth-0.2.6 zipp-3.15.0

phy crashes because of fresh numpy

(phy) <ws>:~/.local/apps$ phy -h
/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/plot/gloo/variable.py:86: FutureWarning: In the future `np.bool` will be defined as the corresponding NumPy scalar.
  gl.GL_BOOL: (1, gl.GL_BOOL, np.bool),
Traceback (most recent call last):
  File "/home/rth/.local/apps/phy/bin/phy", line 5, in <module>
    from phy.apps import phycli
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/apps/__init__.py", line 25, in <module>
    from .base import (  # noqa
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/apps/base.py", line 26, in <module>
    from phy.cluster._utils import RotatingProperty
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/cluster/__init__.py", line 9, in <module>
    from .views import *  # noqa
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/cluster/views/__init__.py", line 10, in <module>
    from .base import ManualClusteringView  # noqa
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/cluster/views/base.py", line 21, in <module>
    from phy.plot import PlotCanvas, NDC, extend_bounds
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/plot/__init__.py", line 17, in <module>
    from .base import BaseVisual, GLSLInserter, BaseCanvas, BaseLayout
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/plot/base.py", line 20, in <module>
    from . import gloo
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/plot/gloo/__init__.py", line 10, in <module>
    from .program import Program
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/plot/gloo/program.py", line 18, in <module>
    from .variable import Uniform, Attribute
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/plot/gloo/variable.py", line 86, in <module>
    gl.GL_BOOL: (1, gl.GL_BOOL, np.bool),
  File "/home/rth/.local/apps/phy/lib/python3.10/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. Did you mean: 'bool_'?

FIX for the numpy problem

(phy) <ws>:~/.local/apps$ pip install numpy==1.23.5
Collecting numpy==1.23.5
  Using cached numpy-1.23.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)
Installing collected packages: numpy
  Attempting uninstall: numpy
    Found existing installation: numpy 1.24.3
    Uninstalling numpy-1.24.3:
      Successfully uninstalled numpy-1.24.3
Successfully installed numpy-1.23.5
(phy) <ws>:~/.local/apps$ phy -h
Usage: phy [OPTIONS] COMMAND [ARGS]...

  Interactive visualization and manual spike sorting of large-scale ephys
  data.

Options:
  --version   Show the version and exit.
  -h, --help  Show this message and exit.

Commands:
  alf-convert        Convert an ephys dataset into ALF.
  extract-waveforms  Extract spike waveforms.
  kwik-describe      Describe a Kwik file.
  kwik-gui           Launch the Kwik GUI on a Kwik file.
  template-describe  Describe a template file.
  template-gui       Launch the template GUI on a params.py file.
  trace-gui          Launch the trace GUI on a raw data file.

Trying KS 2.5 phy export

(phy) <ws>:~/.local/apps$ cd ~/Rhythm_FPGA-100.0-ks2.5/
(phy) <ws>:~/Rhythm_FPGA-100.0-ks2.5$ phy template-describe params.py 
15:44:42.226 [W] model:603            Unreferenced clusters found in templates (generally not a problem)
15:44:42.228 [W] model:625            Unreferenced clusters found in spike_clusters (generally not a problem)
15:44:42.232 [W] model:667            Skipping spike waveforms that do not exist, they will be extracted on the fly from the raw data as needed.
15:44:42.233 [W] model:55             133/4489 values are nan in /home/rth/Rhythm_FPGA-100.0-ks2.5/similar_templates.npy, replacing by zero.
Data files              /home/rth/Rhythm_FPGA-100.0-ks2.5/temp_wh.dat
Directory               /home/rth/Rhythm_FPGA-100.0-ks2.5
Duration                1014.6s
Sample rate             30.0 kHz
Data type               int16
# of channels           128
# of channels (raw)     128
# of templates          67
# of spikes             46,850
(phy) <ws>:~/Rhythm_FPGA-100.0-ks2.5$ phy template-gui params.py 
15:45:39.332 [W] model:603            Unreferenced clusters found in templates (generally not a problem)
15:45:39.333 [W] model:625            Unreferenced clusters found in spike_clusters (generally not a problem)
15:45:39.337 [W] model:667            Skipping spike waveforms that do not exist, they will be extracted on the fly from the raw data as needed.
15:45:39.338 [W] model:55             133/4489 values are nan in /home/rth/Rhythm_FPGA-100.0-ks2.5/similar_templates.npy, replacing by zero.

Screenshot_20230502_152610

Then try to close

Screenshot_20230502_152638 Screenshot_20230502_152645

zm711 commented 1 year ago

@rat-h Not completely sure, but first thing I would try are these two commands:

phy template-gui params.py --clear-state
phy template-gui params.py --clear-cache

Those are the commands to try to fix any GUI errors. They just clear the global and local gui state. here is the info from their RTD: https://phy.readthedocs.io/en/latest/troubleshooting/

I would say worth a try and if it still doesn't work then maybe use a lower python version, but not sure with Linux issues.

rat-h commented 1 year ago

I tried the last command before with the same result.

I have run both and combination of two

phy template-gui params.py --clear-state --clear-cache

with no luck

zm711 commented 1 year ago

The numpy #1193 and linux issues #1202 have been reported, so I think the issue might be that there are multiple versions of packages no longer playing super well together. I know @caniko wrote a phy-poetry with versions pinned, but I'm not sure which OS it works with/which python it needs (I also don't know poetry for dependency-management), but you might want to check out the repo and decide if you want to give that a try.

caniko commented 1 year ago

It works with every OS supported by phy @zm711; I am on Arch Linux myself.

You can just pip install phy-poetry, and proceed as before (as if pip install phy). No need to worry about poetry that is strictly for the developer to worry about, not the end-user :relaxed:

Installing with phy-poetry should solve the numpy related problems raised by this issue; furthermore, the problem is not limited to Linux.

zm711 commented 1 year ago

Absolutely agree that the numpy issue is for everything, but on Windows with conda one can spin up an env for phy with no problem (after reverting numpy), so I'm wondering if there is some other package that needed to be pinned for this to work on some of the Linux flavors @caniko. Most of the recent issues all seem to be linux-based even after reverting numpy <1.24. Either way if you try this (@rat-h) and it works could be a good way to solve issues for a lot of the linux users posting issues.

rat-h commented 1 year ago

phy-poetry solves numpy problem but doesn't solve empty gui and the errors when close the application.

<ws>:~/.local/apps$ python -m venv phy
<ws>:~/.local/apps$ source phy/bin/activate
(phy) <ws>:~/.local/apps$ pip install phy-poetry
Collecting phy-poetry
  Downloading phy_poetry-0.1.4-py3-none-any.whl (2.4 kB)
Collecting phy==2.0b5
  Using cached phy-2.0b5-py2.py3-none-any.whl
Collecting numpy<1.24.0
  Using cached numpy-1.23.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)
Collecting phylib
  Using cached phylib-2.4.3-py2.py3-none-any.whl (80 kB)
Collecting cython
  Using cached Cython-0.29.34-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (1.9 MB)
Collecting joblib
  Using cached joblib-1.2.0-py3-none-any.whl (297 kB)
Collecting mkdocs
  Downloading mkdocs-1.4.3-py3-none-any.whl (3.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.7/3.7 MB 53.7 MB/s eta 0:00:00
Collecting qtconsole
  Using cached qtconsole-5.4.2-py3-none-any.whl (121 kB)
Collecting mtscomp
  Using cached mtscomp-1.0.2-py2.py3-none-any.whl (16 kB)
Collecting matplotlib
  Using cached matplotlib-3.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (11.6 MB)
Collecting scipy
  Using cached scipy-1.10.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (34.4 MB)
Collecting h5py
  Using cached h5py-3.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (4.6 MB)
Collecting PyQt5
  Using cached PyQt5-5.15.9-cp37-abi3-manylinux_2_17_x86_64.whl (8.4 MB)
Collecting colorcet
  Using cached colorcet-3.0.1-py2.py3-none-any.whl (1.7 MB)
Collecting pyopengl
  Using cached PyOpenGL-3.1.6-py3-none-any.whl (2.4 MB)
Collecting PyQtWebEngine
  Using cached PyQtWebEngine-5.15.6-cp37-abi3-manylinux1_x86_64.whl (230 kB)
Collecting dask
  Using cached dask-2023.4.1-py3-none-any.whl (1.2 MB)
Collecting requests
  Downloading requests-2.30.0-py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.5/62.5 KB 21.4 MB/s eta 0:00:00
Collecting tqdm
  Using cached tqdm-4.65.0-py3-none-any.whl (77 kB)
Collecting pillow
  Using cached Pillow-9.5.0-cp310-cp310-manylinux_2_28_x86_64.whl (3.4 MB)
Collecting click
  Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting pyct>=0.4.4
  Using cached pyct-0.5.0-py2.py3-none-any.whl (15 kB)
Collecting packaging>=20.0
  Using cached packaging-23.1-py3-none-any.whl (48 kB)
Collecting importlib-metadata>=4.13.0
  Using cached importlib_metadata-6.6.0-py3-none-any.whl (22 kB)
Collecting toolz>=0.10.0
  Using cached toolz-0.12.0-py3-none-any.whl (55 kB)
Collecting fsspec>=2021.09.0
  Using cached fsspec-2023.4.0-py3-none-any.whl (153 kB)
Collecting pyyaml>=5.3.1
  Using cached PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (682 kB)
Collecting cloudpickle>=1.5.0
  Using cached cloudpickle-2.2.1-py3-none-any.whl (25 kB)
Collecting partd>=1.2.0
  Using cached partd-1.4.0-py3-none-any.whl (18 kB)
Collecting fonttools>=4.22.0
  Using cached fonttools-4.39.3-py3-none-any.whl (1.0 MB)
Collecting kiwisolver>=1.0.1
  Using cached kiwisolver-1.4.4-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl (1.6 MB)
Collecting python-dateutil>=2.7
  Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting pyparsing>=2.3.1
  Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Collecting cycler>=0.10
  Using cached cycler-0.11.0-py3-none-any.whl (6.4 kB)
Collecting contourpy>=1.0.1
  Using cached contourpy-1.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (300 kB)
Collecting watchdog>=2.0
  Using cached watchdog-3.0.0-py3-none-manylinux2014_x86_64.whl (82 kB)
Collecting mergedeep>=1.3.4
  Using cached mergedeep-1.3.4-py3-none-any.whl (6.4 kB)
Collecting jinja2>=2.11.1
  Using cached Jinja2-3.1.2-py3-none-any.whl (133 kB)
Collecting markdown<3.4,>=3.2.1
  Using cached Markdown-3.3.7-py3-none-any.whl (97 kB)
Collecting ghp-import>=1.0
  Using cached ghp_import-2.1.0-py3-none-any.whl (11 kB)
Collecting pyyaml-env-tag>=0.1
  Using cached pyyaml_env_tag-0.1-py3-none-any.whl (3.9 kB)
Collecting PyQt5-sip<13,>=12.11
  Using cached PyQt5_sip-12.12.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.whl (360 kB)
Collecting PyQt5-Qt5>=5.15.2
  Using cached PyQt5_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl (59.9 MB)
Collecting PyQtWebEngine-Qt5>=5.15.0
  Using cached PyQtWebEngine_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl (67.5 MB)
Collecting jupyter-core
  Using cached jupyter_core-5.3.0-py3-none-any.whl (93 kB)
Collecting ipython-genutils
  Using cached ipython_genutils-0.2.0-py2.py3-none-any.whl (26 kB)
Collecting pyzmq>=17.1
  Using cached pyzmq-25.0.2-cp310-cp310-manylinux_2_28_x86_64.whl (1.1 MB)
Collecting traitlets!=5.2.1,!=5.2.2
  Using cached traitlets-5.9.0-py3-none-any.whl (117 kB)
Collecting pygments
  Using cached Pygments-2.15.1-py3-none-any.whl (1.1 MB)
Collecting ipykernel>=4.1
  Using cached ipykernel-6.22.0-py3-none-any.whl (149 kB)
Collecting qtpy>=2.0.1
  Using cached QtPy-2.3.1-py3-none-any.whl (84 kB)
Collecting jupyter-client>=4.1
  Using cached jupyter_client-8.2.0-py3-none-any.whl (103 kB)
Collecting charset-normalizer<4,>=2
  Using cached charset_normalizer-3.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (199 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2022.12.7-py3-none-any.whl (155 kB)
Collecting urllib3<3,>=1.21.1
  Downloading urllib3-2.0.2-py3-none-any.whl (123 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.2/123.2 KB 36.1 MB/s eta 0:00:00
Collecting zipp>=0.5
  Using cached zipp-3.15.0-py3-none-any.whl (6.8 kB)
Collecting nest-asyncio
  Using cached nest_asyncio-1.5.6-py3-none-any.whl (5.2 kB)
Collecting psutil
  Using cached psutil-5.9.5-cp36-abi3-manylinux_2_12_x86_64.manylinux2010_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (282 kB)
Collecting matplotlib-inline>=0.1
  Using cached matplotlib_inline-0.1.6-py3-none-any.whl (9.4 kB)
Collecting debugpy>=1.6.5
  Using cached debugpy-1.6.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)
Collecting tornado>=6.1
  Using cached tornado-6.3.1-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (426 kB)
Collecting ipython>=7.23.1
  Downloading ipython-8.13.2-py3-none-any.whl (797 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 797.7/797.7 KB 72.1 MB/s eta 0:00:00
Collecting comm>=0.1.1
  Using cached comm-0.1.3-py3-none-any.whl (6.6 kB)
Collecting MarkupSafe>=2.0
  Using cached MarkupSafe-2.1.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (25 kB)
Collecting platformdirs>=2.5
  Using cached platformdirs-3.5.0-py3-none-any.whl (15 kB)
Collecting locket
  Using cached locket-1.0.0-py2.py3-none-any.whl (4.4 kB)
Collecting param>=1.7.0
  Using cached param-1.13.0-py2.py3-none-any.whl (87 kB)
Collecting six>=1.5
  Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting decorator
  Using cached decorator-5.1.1-py3-none-any.whl (9.1 kB)
Collecting prompt-toolkit!=3.0.37,<3.1.0,>=3.0.30
  Using cached prompt_toolkit-3.0.38-py3-none-any.whl (385 kB)
Collecting backcall
  Using cached backcall-0.2.0-py2.py3-none-any.whl (11 kB)
Collecting pickleshare
  Using cached pickleshare-0.7.5-py2.py3-none-any.whl (6.9 kB)
Collecting stack-data
  Using cached stack_data-0.6.2-py3-none-any.whl (24 kB)
Collecting jedi>=0.16
  Using cached jedi-0.18.2-py2.py3-none-any.whl (1.6 MB)
Collecting pexpect>4.3
  Using cached pexpect-4.8.0-py2.py3-none-any.whl (59 kB)
Collecting parso<0.9.0,>=0.8.0
  Using cached parso-0.8.3-py2.py3-none-any.whl (100 kB)
Collecting ptyprocess>=0.5
  Using cached ptyprocess-0.7.0-py2.py3-none-any.whl (13 kB)
Collecting wcwidth
  Using cached wcwidth-0.2.6-py2.py3-none-any.whl (29 kB)
Collecting pure-eval
  Using cached pure_eval-0.2.2-py3-none-any.whl (11 kB)
Collecting executing>=1.2.0
  Using cached executing-1.2.0-py2.py3-none-any.whl (24 kB)
Collecting asttokens>=2.1.0
  Using cached asttokens-2.2.1-py2.py3-none-any.whl (26 kB)
Installing collected packages: wcwidth, PyQtWebEngine-Qt5, PyQt5-Qt5, pyopengl, pure-eval, ptyprocess, pickleshare, mtscomp, ipython-genutils, executing, backcall, zipp, watchdog, urllib3, traitlets, tqdm, tornado, toolz, six, pyzmq, pyyaml, PyQt5-sip, pyparsing, pygments, psutil, prompt-toolkit, platformdirs, pillow, pexpect, parso, param, packaging, numpy, nest-asyncio, mergedeep, MarkupSafe, markdown, locket, kiwisolver, joblib, idna, fsspec, fonttools, decorator, debugpy, cython, cycler, cloudpickle, click, charset-normalizer, certifi, scipy, requests, qtpy, pyyaml-env-tag, python-dateutil, PyQt5, pyct, partd, matplotlib-inline, jupyter-core, jinja2, jedi, importlib-metadata, h5py, contourpy, comm, asttokens, stack-data, PyQtWebEngine, matplotlib, jupyter-client, ghp-import, dask, colorcet, phylib, mkdocs, ipython, ipykernel, qtconsole, phy, phy-poetry
Successfully installed MarkupSafe-2.1.2 PyQt5-5.15.9 PyQt5-Qt5-5.15.2 PyQt5-sip-12.12.1 PyQtWebEngine-5.15.6 PyQtWebEngine-Qt5-5.15.2 asttokens-2.2.1 backcall-0.2.0 certifi-2022.12.7 charset-normalizer-3.1.0 click-8.1.3 cloudpickle-2.2.1 colorcet-3.0.1 comm-0.1.3 contourpy-1.0.7 cycler-0.11.0 cython-0.29.34 dask-2023.4.1 debugpy-1.6.7 decorator-5.1.1 executing-1.2.0 fonttools-4.39.3 fsspec-2023.4.0 ghp-import-2.1.0 h5py-3.8.0 idna-3.4 importlib-metadata-6.6.0 ipykernel-6.22.0 ipython-8.13.2 ipython-genutils-0.2.0 jedi-0.18.2 jinja2-3.1.2 joblib-1.2.0 jupyter-client-8.2.0 jupyter-core-5.3.0 kiwisolver-1.4.4 locket-1.0.0 markdown-3.3.7 matplotlib-3.7.1 matplotlib-inline-0.1.6 mergedeep-1.3.4 mkdocs-1.4.3 mtscomp-1.0.2 nest-asyncio-1.5.6 numpy-1.23.5 packaging-23.1 param-1.13.0 parso-0.8.3 partd-1.4.0 pexpect-4.8.0 phy-2.0b5 phy-poetry-0.1.4 phylib-2.4.3 pickleshare-0.7.5 pillow-9.5.0 platformdirs-3.5.0 prompt-toolkit-3.0.38 psutil-5.9.5 ptyprocess-0.7.0 pure-eval-0.2.2 pyct-0.5.0 pygments-2.15.1 pyopengl-3.1.6 pyparsing-3.0.9 python-dateutil-2.8.2 pyyaml-6.0 pyyaml-env-tag-0.1 pyzmq-25.0.2 qtconsole-5.4.2 qtpy-2.3.1 requests-2.30.0 scipy-1.10.1 six-1.16.0 stack-data-0.6.2 toolz-0.12.0 tornado-6.3.1 tqdm-4.65.0 traitlets-5.9.0 urllib3-2.0.2 watchdog-3.0.0 wcwidth-0.2.6 zipp-3.15.0
(phy) <ws>:~/.local/apps$ cd ~/Rhythm_FPGA-100.0-ks2.5/
(phy) <ws>:~/Rhythm_FPGA-100.0-ks2.5$ phy template-gui params.py --clear-state --clear-cache
10:58:29.336 [W] model:603            Unreferenced clusters found in templates (generally not a problem)
10:58:29.338 [W] model:625            Unreferenced clusters found in spike_clusters (generally not a problem)
10:58:29.342 [W] model:667            Skipping spike waveforms that do not exist, they will be extracted on the fly from the raw data as needed.
10:58:29.343 [W] model:55             133/4489 values are nan in /home/rth/Rhythm_FPGA-100.0-ks2.5/similar_templates.npy, replacing by zero.
10:58:29.514 [W] base:941             Deleting the cache directory /home/rth/Rhythm_FPGA-100.0-ks2.5/.phy.
10:58:29.543 [W] base:948             Deleting /home/rth/.phy/TemplateGUI/state.json.
10:58:29.560 [I] state:180            Copied /home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/apps/template/static/state.json to /home/rth/.phy/TemplateGUI/state.json.
rat-h commented 1 year ago

Update I installed Miniconda3-py39_23.3.1-0-Linux-x86_64 which required to reinstall PyQt5

pip install pyqt5 pyqt5-tools pyqt5.sip

and the result is the same on older Python version.

zm711 commented 1 year ago

Spyking Circus has this documentation for trying to install phy. So it might be worth trying their instructions, but there are so many packages I really don't know how to figure out the mismatched one causing the issue.

spiking-circus

pip install colorcet pyopengl qtconsole requests traitlets tqdm joblib click mkdocs dask toolz mtscomp
pip install --upgrade https://github.com/cortex-lab/phy/archive/master.zip
pip install --upgrade https://github.com/cortex-lab/phylib/archive/master.zip
rat-h commented 1 year ago

@zm711 I reinstall Microconda and followed instructions above - the same result

caniko commented 1 year ago

Do you have QT installed @rat-h? You need QT to be installed

rat-h commented 1 year ago

it is installed! I use KDE and libqt5-dev is installed :)

qmake --version
QMake version 3.1
Using Qt version 5.15.3 in /usr/lib/x86_64-linux-gnu

Otherwise, I would have lib error, not an empty GUI with all right subwindows and doc areas..... All Qt apps are functioning correctly on this computer.

Also the same phy directory works fine in Windows. So it is truly Linux related problem.

rat-h commented 1 year ago

Update I ran it with --debug flag. Here's an output

phy template-gui params.py --clear-state --clear-cache --debug
16:11:34.293 [D] __init__:68          Start capturing exceptions.
16:11:34.298 [W] model:603            Unreferenced clusters found in templates (generally not a problem)
16:11:34.299 [D] model:619            Loading spike clusters.
16:11:34.300 [W] model:625            Unreferenced clusters found in spike_clusters (generally not a problem)
16:11:34.302 [D] model:569            No channel shank file found.
16:11:34.302 [D] model:692            Loading templates.
16:11:34.304 [D] model:724            Templates are dense.
16:11:34.304 [W] model:667            Skipping spike waveforms that do not exist, they will be extracted on the fly from the raw data as needed.
16:11:34.304 [D] model:730            Loading the whitening matrix.
16:11:34.304 [D] model:737            Loading the inverse of the whitening matrix.
16:11:34.305 [W] model:55             133/4489 values are nan in /home/rth/Rhythm_FPGA-100.0-ks2.5/similar_templates.npy, replacing by zero.
16:11:34.305 [D] model:766            Loading features.
16:11:34.306 [D] model:781            Features are sparse.
16:11:34.306 [D] model:803            Loading template features.
16:11:34.307 [D] model:813            Template features are sparse.
16:11:34.307 [D] model:504            Load `cluster_KSLabel.tsv`.
16:11:34.307 [D] model:504            Load `cluster_ContamPct.tsv`.
16:11:34.308 [D] model:504            Load `cluster_Amplitude.tsv`.
16:11:34.308 [D] model:504            Load `cluster_group.tsv`.
16:11:34.452 [W] base:941             Deleting the cache directory /home/rth/Rhythm_FPGA-100.0-ks2.5/.phy.
16:11:34.453 [D] context:80           Create cache directory `/home/rth/Rhythm_FPGA-100.0-ks2.5/.phy`.
16:11:34.470 [D] context:100          Initialize joblib cache dir at `/home/rth/Rhythm_FPGA-100.0-ks2.5/.phy`.
16:11:34.470 [D] context:101          Reducing the size of the cache if needed.
16:11:34.471 [D] base:102             Add filter `high_pass`.
16:11:34.471 [W] base:948             Deleting /home/rth/.phy/TemplateGUI/state.json.
16:11:34.471 [D] config:31            Load config file `/home/rth/.phy/phy_config.py`.
16:11:34.471 [D] plugin:145           Loading 0 plugins.
16:11:34.472 [D] context:209          The file `/home/rth/Rhythm_FPGA-100.0-ks2.5/.phy/new_cluster_id.pkl` doesn't exist.
16:11:34.473 [D] context:209          The file `/home/rth/Rhythm_FPGA-100.0-ks2.5/.phy/spikes_per_cluster.pkl` doesn't exist.
16:11:34.473 [D] clustering:237       Recompute spikes_per_cluster manually: this might take a while.
16:11:34.475 [D] context:185          Save data to `/home/rth/Rhythm_FPGA-100.0-ks2.5/.phy/spikes_per_cluster.pkl`.
16:11:34.483 [D] gui:463              Creating GUI.
16:11:34.488 [D] state:177            The GUI state file `/home/rth/.phy/TemplateGUI/state.json` doesn't exist, creating a default one...
16:11:34.488 [I] state:180            Copied /home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/apps/template/static/state.json to /home/rth/.phy/TemplateGUI/state.json.
16:11:34.488 [D] state:46             Load /home/rth/.phy/TemplateGUI/state.json for GUIState.
16:11:34.791 [D] gui:718              Add view ClusterView to GUI.
16:11:34.834 [D] gui:718              Add view SimilarityView to GUI.
16:11:34.878 [D] gui:718              Add view WaveformView to GUI.
16:11:34.889 [D] base:337             Set state for WaveformView.
16:11:34.901 [D] gui:718              Add view CorrelogramView to GUI.
16:11:34.902 [D] base:337             Set state for CorrelogramView.
16:11:34.923 [D] gui:718              Add view ISIView to GUI.
16:11:34.925 [D] base:337             Set state for ISIView.
16:11:34.948 [D] gui:718              Add view FeatureView to GUI.
16:11:34.950 [D] base:337             Set state for FeatureView.
16:11:34.971 [D] gui:718              Add view AmplitudeView to GUI.
16:11:34.972 [D] base:337             Set state for AmplitudeView.
16:11:34.991 [D] gui:718              Add view FiringRateView to GUI.
16:11:34.992 [D] base:337             Set state for FiringRateView.
16:11:35.197 [D] gui:718              Add view TraceView to GUI.
16:11:35.198 [D] base:337             Set state for TraceView.
16:11:35.198 [D] base:494             Set color scheme to depth.
16:11:35.238 [D] base:1623            Adding default color schemes to TraceView.
16:11:35.382 [D] gui:718              Add view ProbeView to GUI.
16:11:35.384 [D] base:337             Set state for ProbeView.
16:11:35.397 [D] gui:718              Add view TemplateFeatureView to GUI.
16:11:35.398 [D] base:337             Set state for TemplateFeatureView.
16:11:35.415 [D] gui:718              Add view ClusterScatterView to GUI.
16:11:35.416 [D] base:337             Set state for ClusterScatterView.
16:11:35.416 [D] base:494             Set color scheme to firing_rate.
16:11:35.417 [D] base:1623            Adding default color schemes to ClusterScatterView.
16:11:35.505 [D] gui:519              Load the geometry state.
zm711 commented 1 year ago

What about if you close the gui. When I ran --debug I got

16:19:30.902 [D] model:263            Close memmap array features.
16:19:30.904 [D] model:263            Close memmap array sparse_features.data.
16:19:30.904 [D] model:263            Close memmap array sparse_features.cols.
16:19:30.906 [D] model:263            Close memmap array sparse_template_features.data.
16:19:30.907 [D] model:263            Close memmap array sparse_templates.data.
16:19:30.907 [D] model:263            Close memmap array template_features.
16:19:30.907 [D] __init__:87          Stop capturing exceptions.
rat-h commented 1 year ago

in my case

16:15:31.084 [E] qt:178               Timeout in _block().
16:15:31.095 [E] __init__:62          An error has occurred (RuntimeError): Timeout in _block().
Traceback (most recent call last):
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/gui/gui.py", line 590, in closeEvent
    res = emit('close', self)
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phylib/utils/event.py", line 141, in emit
    res.append(f(sender, *args, **kwargs))
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/cluster/supervisor.py", line 729, in _save_gui_state
    gui.state.update_view_state(self.cluster_view, self.cluster_view.state)
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/cluster/supervisor.py", line 333, in state
    b.wait()
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/gui/widgets.py", line 191, in wait
    _block(self.have_all_finished)
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/gui/qt.py", line 182, in _block
    raise RuntimeError("Timeout in _block().")
RuntimeError: Timeout in _block().

16:15:36.382 [E] qt:178               Timeout in _block().
16:15:36.386 [E] __init__:62          An error has occurred (RuntimeError): Timeout in _block().
Traceback (most recent call last):
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/gui/gui.py", line 590, in closeEvent
    res = emit('close', self)
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phylib/utils/event.py", line 141, in emit
    res.append(f(sender, *args, **kwargs))
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/cluster/supervisor.py", line 729, in _save_gui_state
    gui.state.update_view_state(self.cluster_view, self.cluster_view.state)
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/cluster/supervisor.py", line 333, in state
    b.wait()
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/gui/widgets.py", line 191, in wait
    _block(self.have_all_finished)
  File "/home/rth/.local/apps/phy/lib/python3.10/site-packages/phy/gui/qt.py", line 182, in _block
    raise RuntimeError("Timeout in _block().")
RuntimeError: Timeout in _block().

16:15:36.406 [D] model:263            Close memmap array features.
16:15:36.406 [D] model:263            Close memmap array sparse_clusters.data.
16:15:36.406 [D] model:263            Close memmap array sparse_features.data.
16:15:36.406 [D] model:263            Close memmap array sparse_features.cols.
16:15:36.406 [D] model:263            Close memmap array sparse_template_features.data.
16:15:36.406 [D] model:263            Close memmap array sparse_templates.data.
16:15:36.406 [D] model:263            Close memmap array template_features.
16:15:36.406 [D] __init__:87          Stop capturing exceptions.

I believe these are the same errors messages as in GUI in the first post

rat-h commented 1 year ago

I naively inserted a few printing lines into ClusterView._reset_table function in phy/cluster/supervisor.py. It seems, it was called twice: the first time with absolutely correctly read data, but the second time with data=None. Can it be a source of the empty GUI?

16:51:24.549 [D] state:46             Load /home/rth/.phy/TemplateGUI/state.json for GUIState.
------------------------------------------
data [{'id': 0, 'ch': '7', 'sh': 0, 'depth': 553.0, 'fr': 0.04632306560134567, 'amp': 39.31453, 'n_spikes': 47, 'Amplitude': 472.2, 'ContamPct': 0.0, 'KSLabel': 'mua', 'group': None, 'is_masked': False}, {'id': 1, ......, 'fr': 0.14882516820857863, 'amp': 43.894745, 'n_spikes': 151, 'Amplitude': 567.4, 'ContamPct': 0.0, 'KSLabel': 'mua', 'group': None, 'is_masked': False}, {'id': 66, 'ch': '117', 'sh': 0, 'depth': 231.0, 'fr': 0.00887037426408747, 'amp': 54.40136, 'n_spikes': 9, 'Amplitude': 622.4, 'ContamPct': 100.0, 'KSLabel': 'mua', 'group': None, 'is_masked': False}]
columns ['id', 'ch', 'sh', 'depth', 'fr', 'amp', 'n_spikes', 'KSLabel', 'ContamPct', 'Amplitude']
value_names ['id', 'ch', 'sh', 'depth', 'fr', 'amp', 'n_spikes', 'KSLabel', 'ContamPct', 'Amplitude', {'data': ['group']}]
sort ['n_spikes', 'desc']
------------------------------------------
------------------------------------------
data None
columns ['id', 'ch', 'sh', 'depth', 'fr', 'amp', 'n_spikes', 'KSLabel', 'ContamPct', 'Amplitude', 'similarity']
value_names ['id', 'ch', 'sh', 'depth', 'fr', 'amp', 'n_spikes', 'KSLabel', 'ContamPct', 'Amplitude', 'similarity', {'data': ['group']}]
sort ('similarity', 'desc')
------------------------------------------
zm711 commented 1 year ago

Based on the traceback it seems like it is "waiting" too long while trying to update the gui state causing the runtime error. I guess that raises two questions:

  1. Even if the gui state itself isn't saved are you able to use the gui, close and reload the curated values? You should check to see if the cluster_group.tsv file is being changed since that should be your curation file. If that is being changed then the gui is still working, but just misbehaving at close. Annoying, but not the end of the world. Just remember to use the tsv for your post-curation analysis.
  2. What size is your data? Is it taking too long to try to save the gui state because you're overwhelming it with the amount of data you have (in which case congrats, haha)? Maybe your computer specs aren't high enough for the gui/data can handle?
  3. The gui you're showing is what is being displayed so it is actually failing before the gui is even fully initialized which the logs aren't saying, but that maybe you're seeing?
zm711 commented 1 year ago

One other question/idea: So looking back at template-describe above I see

/home/rth/Rhythm_FPGA-100.0-ks2.5/temp_wh.dat

You're using the intermediate data generated by matlab in a binary format, whereas my phy is using the *.bin file that I originally loaded into Kilosort and not the temp_wh.dat from Kilosort. Do you have the raw input binary you used? The kilosort example is given as:

>> datI = int16(dat);
>> whos datI 
  Name        Size                  Bytes  Class    Attributes

  datI      385x30000            23100000  int16              

% This dataset is 385 channels by 30000 time samples.
>> fid = fopen('D:\my\path\myNewFile.bin', 'w'); 
>> fwrite(fid, datI, 'int16');
>> fclose(fid);

So my phy is reading the myNewFile.bin in their example and not the temp_wh like yours is trying to do.

caniko commented 1 year ago

Can you try to load another dataset? Can you post your system info?

rat-h commented 1 year ago

@caniko, @zm711

I think the problem is on phy side, and here's why: (1) as I note above, it seems GUI is initialized twice: the first time with the correct set of clusters/units and the second time with None. So after the second initialization, there are no clusters, units, and spikes. GUI is just logically empty. (2) I track cluster_group.tsv to confirm this hypothesis before and after saving in gui. The original file looks like that

$ head cluster_group.tsv 
cluster_id      KSLabel
0       mua
1       mua
2       good
3       mua
4       mua
5       mua
6       mua
7       mua
8       mua

but after Ctrl+S in GUI, it was changed to

$ head cluster_group.tsv 
cluster_id      group

However, this does not happen if the file was generated by spikeinterface and looks like that

$ head cluster_group.tsv 
cluster_id      group
0       unsorted
1       unsorted
2       unsorted
3       unsorted
4       unsorted
5       unsorted
6       unsorted
7       unsorted
8       unsorted

In this case, the file was left intact.

system

PopOS! from System76 with KDE.

$ cat /etc/pop-os/lsb-release 
DISTRIB_ID=Pop
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Pop!_OS 22.04 LTS"
$ cat /etc/lsb-release 
DISTRIB_ID=Pop
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Pop!_OS 22.04 LTS"
PREEMPT_DYNAMIC Wed A x86_64 x86_64 x86_64 GNU/Linux
$ uname -a
Linux <ws> 6.2.6-76060206-generic #202303130630~1681329778~22.04~d824cd4 SMP PREEMPT_DYNAMIC Wed A x86_64 x86_64 x86_64 GNU/Linux
$ lscpu
Architecture:            x86_64
  CPU op-mode(s):        32-bit, 64-bit
  Address sizes:         46 bits physical, 48 bits virtual
  Byte Order:            Little Endian
CPU(s):                  16
  On-line CPU(s) list:   0-15
Vendor ID:               GenuineIntel
  Model name:            Intel(R) Core(TM) i7-9800X CPU @ 3.80GHz
    CPU family:          6
    Model:               85
    Thread(s) per core:  2
    Core(s) per socket:  8
    Socket(s):           1
    Stepping:            4
    CPU max MHz:         4500.0000
    CPU min MHz:         1200.0000
    BogoMIPS:            7599.80
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni
                          pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single pti ssbd m
                         ba ibrs ibpb stibp tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xget
                         bv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm ida arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req md_clear flush_l1d arch_capabilities
Virtualization features: 
  Virtualization:        VT-x
Caches (sum of all):     
  L1d:                   256 KiB (8 instances)
  L1i:                   256 KiB (8 instances)
  L2:                    8 MiB (8 instances)
  L3:                    16.5 MiB (1 instance)
NUMA:                    
  NUMA node(s):          1
  NUMA node0 CPU(s):     0-15
Vulnerabilities:         
  Itlb multihit:         KVM: Mitigation: VMX disabled
  L1tf:                  Mitigation; PTE Inversion; VMX conditional cache flushes, SMT vulnerable
  Mds:                   Mitigation; Clear CPU buffers; SMT vulnerable
  Meltdown:              Mitigation; PTI
  Mmio stale data:       Mitigation; Clear CPU buffers; SMT vulnerable
  Retbleed:              Mitigation; IBRS
  Spec store bypass:     Mitigation; Speculative Store Bypass disabled via prctl
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:            Mitigation; IBRS, IBPB conditional, STIBP conditional, RSB filling, PBRSB-eIBRS Not affected
  Srbds:                 Not affected
  Tsx async abort:       Mitigation; Clear CPU buffers; SMT vulnerable
$ free -h
               total        used        free      shared  buff/cache   available
Mem:           125Gi       7.2Gi        17Gi       225Mi       100Gi       109Gi
Swap:          271Gi       475Mi       271Gi

and pretty fast nvme drive.

zm711 commented 1 year ago

I guess then that still leaves the question why linux is doing this wrong, but windows isn't. Since this is at the wait/timeout block (or the traceback is wrong) there must be some issue there, which then causes the gui to freak out and try to reload with empty dataset. I think you figured out what is going wrong, but I honestly don't know why it is going wrong. Like I said, I'm not super familiar with all the packaging behind linux distros, so I probably won't be any help beyond this point. If you have a working windows computer and access to a server I guess you could do the meat of your analysis on your Linux machine, do phy on windows, and then do the final analysis back on your linux machine. Annoying, but at least it works.

caniko commented 1 year ago

I wouldn't blame it on Linux. I have gotten phy-poetry working on Ubuntu, Fedora, and Arch. PopOS is downstream from Ubuntu, so it should be fine. Arch was KDE; Ubuntu and Fedora was Gnome.

PopOS comes with a heavily modified version of GNOME, you said you were on KDE. I am assuming you followed the System76 guide to switch to KDE, it should be fine... Strange that you are experiencing this.

I think your install might be broken. But before proceeding to that conclusion fully:

rat-h commented 1 year ago

@caniko, I haven't given up yet. So let's try to figure out what is going on. Hope we can do it.

I also noticed that version of PyQt is higher than the version of libqt5 installed. I rolled back to match versions in PyQt and libqt5, but the problem was not affected.

zm711 commented 1 year ago

@rat-h Definitely keep me in the loop if you figure it out. I want to switch over to PopOS eventually, but I'm stuck on windows for work.

@caniko Sorry wasn't meaning to blame linux. I meant that getting the packages to play together can require some work so I was agreeing with you in that it could be a specific build issue. Some of the other issues lately have involved Ubuntu problems, so I was wondering if some of the recent updates to some subset of packages upstream at the Ubuntu level are causing issues.

rat-h commented 1 year ago

I installed fresh Ubuntu, sudo apt install kde-stadard libqt5*-dev, then sudo apt install python3-venv, then

python3 -m venv phy
source phy/bin/activate
phy template-gui params.py --debug

The same result

VirtualBox_Ubuntu_08_05_2023_13_50_30

Debug log absolutely the same

13:52:06.594 [D] __init__:68          Start capturing exceptions.
13:52:06.610 [W] model:603            Unreferenced clusters found in templates (generally not a problem)
13:52:06.614 [D] model:619            Loading spike clusters.
13:52:06.616 [W] model:625            Unreferenced clusters found in spike_clusters (generally not a problem)
13:52:06.625 [D] model:569            No channel shank file found.
13:52:06.627 [D] model:692            Loading templates.
13:52:06.635 [D] model:724            Templates are dense.
13:52:06.635 [W] model:667            Skipping spike waveforms that do not exist, they will be extracted on the fly from the raw data as needed.
13:52:06.635 [D] model:730            Loading the whitening matrix.
13:52:06.637 [D] model:737            Loading the inverse of the whitening matrix.
13:52:06.641 [W] model:55             133/4489 values are nan in /experiment/similar_templates.npy, replacing by zero.
13:52:06.644 [D] model:766            Loading features.
13:52:06.650 [D] model:781            Features are sparse.
13:52:06.651 [D] model:803            Loading template features.
13:52:06.658 [D] model:813            Template features are sparse.
13:52:06.663 [D] model:504            Load `cluster_KSLabel.tsv`.
13:52:06.667 [D] model:504            Load `cluster_ContamPct.tsv`.
13:52:06.670 [D] model:504            Load `cluster_Amplitude.tsv`.
13:52:06.672 [D] model:504            Load `cluster_group.tsv`.
13:52:07.492 [D] context:100          Initialize joblib cache dir at `/experiment/.phy`.
13:52:07.493 [D] context:101          Reducing the size of the cache if needed.
13:52:07.511 [D] base:102             Add filter `high_pass`.
13:52:07.512 [D] config:31            Load config file `/home/rth/.phy/phy_config.py`.
13:52:07.513 [D] plugin:145           Loading 0 plugins.
13:52:07.523 [D] context:209          The file `/experiment/.phy/new_cluster_id.pkl` doesn't exist.
13:52:07.542 [D] context:185          Save data to `/experiment/.phy/spikes_per_cluster.pkl`.
13:52:07.614 [D] gui:463              Creating GUI.
13:52:07.630 [D] state:46             Load /home/rth/.phy/TemplateGUI/state.json for GUIState.
13:52:07.933 [D] gui:718              Add view ClusterView to GUI.
13:52:07.963 [D] gui:718              Add view SimilarityView to GUI.
13:52:08.030 [D] gui:718              Add view WaveformView to GUI.
13:52:08.038 [D] base:337             Set state for WaveformView.
13:52:08.057 [D] gui:718              Add view CorrelogramView to GUI.
13:52:08.059 [D] base:337             Set state for CorrelogramView.
13:52:08.092 [D] gui:718              Add view ISIView to GUI.
13:52:08.095 [D] base:337             Set state for ISIView.
13:52:08.115 [D] gui:718              Add view FeatureView to GUI.
13:52:08.117 [D] base:337             Set state for FeatureView.
13:52:08.147 [D] gui:718              Add view AmplitudeView to GUI.
13:52:08.153 [D] base:337             Set state for AmplitudeView.
13:52:08.208 [D] gui:718              Add view FiringRateView to GUI.
13:52:08.210 [D] base:337             Set state for FiringRateView.
13:52:08.598 [D] gui:718              Add view TraceView to GUI.
13:52:08.601 [D] base:337             Set state for TraceView.
13:52:08.601 [D] base:494             Set color scheme to depth.
13:52:08.644 [D] base:1623            Adding default color schemes to TraceView.
13:52:08.799 [D] gui:718              Add view ProbeView to GUI.
13:52:08.801 [D] base:337             Set state for ProbeView.
13:52:08.832 [D] gui:718              Add view TemplateFeatureView to GUI.
13:52:08.834 [D] base:337             Set state for TemplateFeatureView.
13:52:08.871 [D] gui:718              Add view ClusterScatterView to GUI.
13:52:08.873 [D] base:337             Set state for ClusterScatterView.
13:52:08.874 [D] base:494             Set color scheme to firing_rate.
13:52:08.875 [D] base:1623            Adding default color schemes to ClusterScatterView.
13:52:08.996 [D] gui:519              Load the geometry state.
14:12:49.483 [D] base:276             Close view ClusterScatterView.
14:12:49.485 [D] state:171            Update GUI state for ClusterScatterView
14:13:13.147 [E] qt:178               Timeout in _block().
14:13:14.866 [E] __init__:62          An error has occurred (RuntimeError): Timeout in _block().
Traceback (most recent call last):
  File "/home/rth/phy/lib/python3.10/site-packages/phy/gui/gui.py", line 590, in closeEvent
    res = emit('close', self)
  File "/home/rth/phy/lib/python3.10/site-packages/phylib/utils/event.py", line 141, in emit
    res.append(f(sender, *args, **kwargs))
  File "/home/rth/phy/lib/python3.10/site-packages/phy/cluster/supervisor.py", line 729, in _save_gui_state
    gui.state.update_view_state(self.cluster_view, self.cluster_view.state)
  File "/home/rth/phy/lib/python3.10/site-packages/phy/cluster/supervisor.py", line 333, in state
    b.wait()
  File "/home/rth/phy/lib/python3.10/site-packages/phy/gui/widgets.py", line 191, in wait
    _block(self.have_all_finished)
  File "/home/rth/phy/lib/python3.10/site-packages/phy/gui/qt.py", line 182, in _block
    raise RuntimeError("Timeout in _block().")
RuntimeError: Timeout in _block().

14:13:21.725 [E] qt:178               Timeout in _block().
14:13:21.740 [E] __init__:62          An error has occurred (RuntimeError): Timeout in _block().
Traceback (most recent call last):
  File "/home/rth/phy/lib/python3.10/site-packages/phy/gui/gui.py", line 590, in closeEvent
    res = emit('close', self)
  File "/home/rth/phy/lib/python3.10/site-packages/phylib/utils/event.py", line 141, in emit
    res.append(f(sender, *args, **kwargs))
  File "/home/rth/phy/lib/python3.10/site-packages/phy/cluster/supervisor.py", line 729, in _save_gui_state
    gui.state.update_view_state(self.cluster_view, self.cluster_view.state)
  File "/home/rth/phy/lib/python3.10/site-packages/phy/cluster/supervisor.py", line 333, in state
    b.wait()
  File "/home/rth/phy/lib/python3.10/site-packages/phy/gui/widgets.py", line 191, in wait
    _block(self.have_all_finished)
  File "/home/rth/phy/lib/python3.10/site-packages/phy/gui/qt.py", line 182, in _block
    raise RuntimeError("Timeout in _block().")
RuntimeError: Timeout in _block().

14:13:21.777 [D] model:263            Close memmap array features.
14:13:21.779 [D] model:263            Close memmap array sparse_clusters.data.
14:13:21.780 [D] model:263            Close memmap array sparse_features.data.
14:13:21.780 [D] model:263            Close memmap array sparse_features.cols.
14:13:21.781 [D] model:263            Close memmap array sparse_template_features.data.
14:13:21.781 [D] model:263            Close memmap array sparse_templates.data.
14:13:21.781 [D] model:263            Close memmap array template_features.
14:13:21.781 [D] __init__:87          Stop capturing exceptions.
      Load the geometry state.
14:12:49.483 [D] base:276             Close view ClusterScatterView.
14:12:49.483 [D] base:276             Close view ClusterScatterView.
14:12:49.485 [D] state:171            Update GUI state for ClusterScatterView
14:12:49.485 [D] state:171            Update GUI state for ClusterScatterView
14:13:13.147 [E] qt:178               Timeout in _block().
14:13:13.147 [E] qt:178               Timeout in _block().
14:13:14.866 [E] __init__:62          An error has occurred (RuntimeError): Timeout in _block().
Traceback (most recent call last):
  File "/home/rth/phy/lib/python3.10/site-packages/phy/gui/gui.py", line 590, in closeEvent
    res = emit('close', self)
  File "/home/rth/phy/lib/python3.10/site-packages/phylib/utils/event.py", line 141, in emit
    res.append(f(sender, *args, **kwargs))
  File "/home/rth/phy/lib/python3.10/site-packages/phy/cluster/supervisor.py", line 729, in _save_gui_state
    gui.state.update_view_state(self.cluster_view, self.cluster_view.state)
  File "/home/rth/phy/lib/python3.10/site-packages/phy/cluster/supervisor.py", line 333, in state
    b.wait()
  File "/home/rth/phy/lib/python3.10/site-packages/phy/gui/widgets.py", line 191, in wait
    _block(self.have_all_finished)
  File "/home/rth/phy/lib/python3.10/site-packages/phy/gui/qt.py", line 182, in _block
    raise RuntimeError("Timeout in _block().")
RuntimeError: Timeout in _block().

14:13:14.866 [E] __init__:62          An error has occurred (RuntimeError): Timeout in _block().
Traceback (most recent call last):
  File "/home/rth/phy/lib/python3.10/site-packages/phy/gui/gui.py", line 590, in closeEvent
    res = emit('close', self)
  File "/home/rth/phy/lib/python3.10/site-packages/phylib/utils/event.py", line 141, in emit
    res.append(f(sender, *args, **kwargs))
  File "/home/rth/phy/lib/python3.10/site-packages/phy/cluster/supervisor.py", line 729, in _save_gui_state
    gui.state.update_view_state(self.cluster_view, self.cluster_view.state)
  File "/home/rth/phy/lib/python3.10/site-packages/phy/cluster/supervisor.py", line 333, in state
    b.wait()
  File "/home/rth/phy/lib/python3.10/site-packages/phy/gui/widgets.py", line 191, in wait
    _block(self.have_all_finished)
  File "/home/rth/phy/lib/python3.10/site-packages/phy/gui/qt.py", line 182, in _block
    raise RuntimeError("Timeout in _block().")
RuntimeError: Timeout in _block().

14:13:21.725 [E] qt:178               Timeout in _block().
14:13:21.725 [E] qt:178               Timeout in _block().
14:13:21.740 [E] __init__:62          An error has occurred (RuntimeError): Timeout in _block().
Traceback (most recent call last):
  File "/home/rth/phy/lib/python3.10/site-packages/phy/gui/gui.py", line 590, in closeEvent
    res = emit('close', self)
  File "/home/rth/phy/lib/python3.10/site-packages/phylib/utils/event.py", line 141, in emit
    res.append(f(sender, *args, **kwargs))
  File "/home/rth/phy/lib/python3.10/site-packages/phy/cluster/supervisor.py", line 729, in _save_gui_state
    gui.state.update_view_state(self.cluster_view, self.cluster_view.state)
  File "/home/rth/phy/lib/python3.10/site-packages/phy/cluster/supervisor.py", line 333, in state
    b.wait()
  File "/home/rth/phy/lib/python3.10/site-packages/phy/gui/widgets.py", line 191, in wait
    _block(self.have_all_finished)
  File "/home/rth/phy/lib/python3.10/site-packages/phy/gui/qt.py", line 182, in _block
    raise RuntimeError("Timeout in _block().")
RuntimeError: Timeout in _block().

14:13:21.740 [E] __init__:62          An error has occurred (RuntimeError): Timeout in _block().
Traceback (most recent call last):
  File "/home/rth/phy/lib/python3.10/site-packages/phy/gui/gui.py", line 590, in closeEvent
    res = emit('close', self)
  File "/home/rth/phy/lib/python3.10/site-packages/phylib/utils/event.py", line 141, in emit
    res.append(f(sender, *args, **kwargs))
  File "/home/rth/phy/lib/python3.10/site-packages/phy/cluster/supervisor.py", line 729, in _save_gui_state
    gui.state.update_view_state(self.cluster_view, self.cluster_view.state)
  File "/home/rth/phy/lib/python3.10/site-packages/phy/cluster/supervisor.py", line 333, in state
    b.wait()
  File "/home/rth/phy/lib/python3.10/site-packages/phy/gui/widgets.py", line 191, in wait
    _block(self.have_all_finished)
  File "/home/rth/phy/lib/python3.10/site-packages/phy/gui/qt.py", line 182, in _block
    raise RuntimeError("Timeout in _block().")
RuntimeError: Timeout in _block().

14:13:21.781 [D] __init__:87          Stop capturing exceptions.
14:13:21.781 [D] __init__:87          Stop capturing exceptions.

and the same problem with initialization twice


------------------------------------
COLUMNS=['id', 'ch', 'sh', 'depth', 'fr', 'amp', 'n_spikes', 'KSLabel', 'ContamPct', 'Amplitude']
VALUES =['id', 'ch', 'sh', 'depth', 'fr', 'amp', 'n_spikes', 'KSLabel', 'ContamPct', 'Amplitude', {'data': ['group']}]
DATA   =[{'id': 0, 'ch': '7', 'sh': 0, 'depth': 553.0, 'fr': 0.04632306560134567, 'amp': 39.31453, 'n_spikes': 47, 'Amplitude': 472.2, 'ContamPct': 0.0, 'KSLabel': 'mua', 'group': None, 'is_masked': False}, {'id': 1, ... _masked': False}, {'id': 64, 'ch': '13', 'sh': 0, 'depth': 415.0, 'fr': 0.6081134356602187, 'amp': 78.238045, 'n_spikes': 617, 'Amplitude': 1414.8, 'ContamPct': 48.1, 'KSLabel': 'mua', 'group': None, 'is_masked': False}, {'id': 65, 'ch': '110', 'sh': 0, 'depth': 392.0, 'fr': 0.14882516820857863, 'amp': 43.894745, 'n_spikes': 151, 'Amplitude': 567.4, 'ContamPct': 0.0, 'KSLabel': 'mua', 'group': None, 'is_masked': False}, {'id': 66, 'ch': '117', 'sh': 0, 'depth': 231.0, 'fr': 0.00887037426408747, 'amp': 54.40136, 'n_spikes': 9, 'Amplitude': 622.4, 'ContamPct': 100.0, 'KSLabel': 'mua', 'group': None, 'is_masked': False}]
CSORT  =['n_spikes', 'desc']
------------------------------------
------------------------------------
COLUMNS=['id', 'ch', 'sh', 'depth', 'fr', 'amp', 'n_spikes', 'KSLabel', 'ContamPct', 'Amplitude', 'similarity']
VALUES =['id', 'ch', 'sh', 'depth', 'fr', 'amp', 'n_spikes', 'KSLabel', 'ContamPct', 'Amplitude', 'similarity', {'data': ['group']}]
DATA   =None
CSORT  =('similarity', 'desc')
------------------------------------
rat-h commented 1 year ago

Well I figured out initialization problem - it isn't a problem just two views: ClusterView and SimilarityView. The last one with empty data.

zm711 commented 1 year ago

@ rat-h. Found this in the old issues. Might want to try? #1143

rat-h commented 1 year ago

IT WORKS!