Open a12468 opened 2 years ago
add git to kilosort2 fold
This error can result if you did not downloaded the Kilosort code using git
(e.g., you downloaded the repository as a .zip file).
To fix it, just change this line to if False:
This will prevent this function from querying the commit date and commit hash of the Kilosort repository, but it won't affect anything else about the sorting pipeline.
I have activated environment, change path in json but it still have error below in cmd window: anyone knows why?
python C:\Users**(myname)\Desktop\mykilo\ecephys_spike_sorting-master\ecephys_spike_sorting\scripts\batch_processing.py ecephys spike sorting: kilosort helper module Traceback (most recent call last): File "C:\ProgramData\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "C:\ProgramData\Anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\qiushou\Desktop\mykilo\ecephys_spike_sorting-master\ecephys_spike_sorting\modules\kilosort_helper__main.py", line 138, in
main()
File "C:\Users\qiushou\Desktop\mykilo\ecephys_spike_sorting-master\ecephys_spike_sorting\modules\kilosort_helper__main.py", line 128, in main
output = run_kilosort(mod.args)
File "C:\Users\qiushou\Desktop\mykilo\ecephys_spike_sorting-master\ecephys_spike_sorting\modules\kilosort_helper\main__.py", line 21, in run_kilosort
commit_date, commit_time = get_repo_commit_date_and_hash(args['kilosort_helper_params']['kilosort_repository'])
File "C:\Users\qiushou\Desktop\mykilo\ecephys_spike_sorting-master\ecephys_spike_sorting\common\utils.py", line 403, in get_repo_commit_date_and_hash
repo = Repo(repo_location)
File "C:\Users\qiushou.virtualenvs\ecephys_spike_sorting-master-DMPDJmnf\lib\site-packages\git\repo\base.py", line 224, in init__
self.working_dir: Optional[PathLike] = self._working_tree_dir or self.common_dir
File "C:\Users\qiushou.virtualenvs\ecephys_spike_sorting-master-DMPDJmnf\lib\site-packages\git\repo\base.py", line 307, in common_dir
raise InvalidGitRepositoryError()
git.exc.InvalidGitRepositoryError
Traceback (most recent call last):
File "C:\Users\qiushou\Desktop\mykilo\ecephys_spike_sorting-master\ecephys_spike_sorting\scripts\batch_processing.py", line 41, in
subprocess.check_call(command.split(' '))
File "C:\ProgramData\Anaconda3\lib\subprocess.py", line 347, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['python', '-W', 'ignore', '-m', 'ecephys_spike_sorting.modules.kilosort_helper', '--input_json', 'D:\02\mice_recording_raw\control\7-2\20211224_pre1\20211224_pre1-input.json', '--output_json', 'D:\02\mice_recording_raw\control\7-2\20211224_pre1\20211224_pre1-output.json']' returned non-zero exit status 1.