ecephys_spike_sorting icon indicating copy to clipboard operation
ecephys_spike_sorting copied to clipboard

raise InvalidGitRepositoryError

Open a12468 opened this issue 3 years ago • 2 comments
trafficstars

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.

a12468 avatar Jun 29 '22 05:06 a12468

add git to kilosort2 fold

a12468 avatar Jun 29 '22 08:06 a12468

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.

jsiegle avatar Jul 06 '22 03:07 jsiegle