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

Index Error #1

Open
areebaqureshi opened this issue Jun 3, 2024 · 3 comments
Open

Index Error #1

areebaqureshi opened this issue Jun 3, 2024 · 3 comments

Comments

@areebaqureshi
Copy link

Hi, I am very new to coding in Python and this might be a naive problem but I keep getting this error when I try to run pks on my folder:
Screen Shot 2024-06-03 at 12 45 18 PM

Any advice is appreciated. Thank you!

@handejong
Copy link
Owner

This happens if you run PKS from the command line without an input argument. Presumably you are running it like so:

$ python -i pks.py

However, you should be appending the path to the dataset that you want to look at, like so:

$ python -i pks.py path/to/folder_with_data

If that is not the case. Would you mind sharing the command that you are using to run the script?

@areebaqureshi
Copy link
Author

Thank you for your response! This is the command I am using: % python -i pks.py /Users/areebaqureshi/Desktop/MscVisualization/P19-ChR2-Kilosort-Output

Actually now when I run this I get this error: File "/Users/areebaqureshi/Desktop/MscVisualization/KS3_2/pks_processing.py", line 1158, in _find_files_with_extension
for file_name in os.listdir(folder_path):
^^^^^^^^^^^^^^^^^^^^^^^
NotADirectoryError: [Errno 20] Not a directory: 'pks.py/'

Is having the 'temp_wh.dat' file necessary to run this the pks.py file?

@handejong
Copy link
Owner

It depends on which version of Kilosort you used. If you used the Matlab version (Kilosort 3.0) a temp.wh file is necessary. Possibly try navigating (in your terminal) to the "P19-ChR2-Kilosort-Output" folder and run the file pks.py from there using "." as the input folder. I also want to point you towards Phy2 (https://github.com/cortex-lab/phy) which is GUI based, so no Python experience necessary.

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