MouseLand / Kilosort

Fast spike sorting with drift correction
https://kilosort.readthedocs.io/en/latest/
GNU General Public License v3.0
484 stars 248 forks source link

BUG: <Can't Run The Package> #756

Closed nacefguessaymi closed 3 months ago

nacefguessaymi commented 3 months ago

Describe the issue:

Can't seem to run the kilosort gui from any command line. Using a 3.9 conda environment. Keep getting the following error: ~ % python -m kilosort Traceback (most recent call last): File "/opt/anaconda3/envs/kilosort/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/opt/anaconda3/envs/kilosort/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/opt/anaconda3/envs/kilosort/lib/python3.9/site-packages/kilosort/__main__.py", line 10, in <module> launcher(args.filename) File "/opt/anaconda3/envs/kilosort/lib/python3.9/site-packages/kilosort/gui/launch.py", line 55, in launcher kilosort_gui = KiloSortGUI(kilosort_application, filename=filename) File "/opt/anaconda3/envs/kilosort/lib/python3.9/site-packages/kilosort/gui/main.py", line 67, in __init__ if show_plots.lower() == 'false': AttributeError: 'bool' object has no attribute 'lower' Managed to work around this by completely removing the "Show Plots" button from line 67 in main.py and header_box.py. Seems there's an attribute error with the qtpy package.

Reproduce the bug:

(kilosort) Nacef@officedock ~ % python -m kilosort

Error message:

(kilosort) Nacef@officedock ~ % python -m kilosort
Traceback (most recent call last):
  File "/opt/anaconda3/envs/kilosort/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/anaconda3/envs/kilosort/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/opt/anaconda3/envs/kilosort/lib/python3.9/site-packages/kilosort/__main__.py", line 10, in <module>
    launcher(args.filename)
  File "/opt/anaconda3/envs/kilosort/lib/python3.9/site-packages/kilosort/gui/launch.py", line 55, in launcher
    kilosort_gui = KiloSortGUI(kilosort_application, filename=filename)
  File "/opt/anaconda3/envs/kilosort/lib/python3.9/site-packages/kilosort/gui/main.py", line 67, in __init__
    if show_plots.lower() == 'false':
AttributeError: 'bool' object has no attribute 'lower'

Version information:

python3.9, kilosort-4.0.13,MacOS

jacobpennington commented 3 months ago

@nacefguessaymi Thanks for catching that. My guess is that the PyQt utility used to cache those settings is storing values differently for Mac. I just pushed a change that should fix this specific error. If you run into more errors like this for other parts of the GUI, please let us know.