Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raise InvalidGitRepositoryError #73

Open
a12468 opened this issue Jun 29, 2022 · 2 comments
Open

raise InvalidGitRepositoryError #73

a12468 opened this issue Jun 29, 2022 · 2 comments

Comments

@a12468
Copy link

a12468 commented Jun 29, 2022

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
Copy link
Author

a12468 commented Jun 29, 2022

add git to kilosort2 fold

@jsiegle
Copy link
Collaborator

jsiegle commented Jul 6, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants