non-Kilosort CSV files in directory cause Phy to crash
Closed this issue · 1 comments
aliddell commented
Problem was I had a CSV describing the probe layout given to me by the author of the dataset and Phy tried to read it.
I would enumerate which CSVs you're expecting to find, or warn users to use a clean directory (preferably both).
Here's the stack trace:
[D] cli:39 Traceback (most recent call last):
File "c:\users\alan\anaconda3\envs\phy\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\users\alan\anaconda3\envs\phy\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\Alan\Anaconda3\envs\phy\Scripts\phy.exe\__main__.py", line 9, in <module>
sys.exit(phy())
File "c:\users\alan\anaconda3\envs\phy\lib\site-packages\click\core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "c:\users\alan\anaconda3\envs\phy\lib\site-packages\click\core.py", line 717, in main
rv = self.invoke(ctx)
File "c:\users\alan\anaconda3\envs\phy\lib\site-packages\click\core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "c:\users\alan\anaconda3\envs\phy\lib\site-packages\click\core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "c:\users\alan\anaconda3\envs\phy\lib\site-packages\click\core.py", line 555, in invoke
return callback(*args, **kwargs)
File "c:\users\alan\anaconda3\envs\phy\lib\site-packages\click\decorators.py", line 17, in new_func
return f(get_current_context(), *args, **kwargs)
File "c:\users\alan\anaconda3\envs\phy\lib\site-packages\phycontrib\template\gui.py", line 602, in gui
_run_cmd('_run(params)', ctx, globals(), locals())
File "c:\users\alan\anaconda3\envs\phy\lib\site-packages\phy\utils\cli.py", line 73, in _run_cmd
return exec_(cmd, glob, loc)
File "<string>", line 1, in <module>
File "c:\users\alan\anaconda3\envs\phy\lib\site-packages\phycontrib\template\gui.py", line 574, in _run
controller = TemplateController(**params)
File "c:\users\alan\anaconda3\envs\phy\lib\site-packages\phycontrib\template\gui.py", line 86, in __init__
self.model = TemplateModel(dat_path, **kwargs)
File "c:\users\alan\anaconda3\envs\phy\lib\site-packages\phycontrib\template\model.py", line 188, in __init__
self._load_data()
File "c:\users\alan\anaconda3\envs\phy\lib\site-packages\phycontrib\template\model.py", line 288, in _load_data
self.metadata = self._load_metadata()
File "c:\users\alan\anaconda3\envs\phy\lib\site-packages\phycontrib\template\model.py", line 317, in _load_metadata
field_name, values = load_metadata(filename)
File "c:\users\alan\anaconda3\envs\phy\lib\site-packages\phycontrib\template\model.py", line 49, in load_metadata
_, field_name = next(reader)
ValueError: too many values to unpack (expected 2)
rossant commented
should be fixed in the dev branch of phy