YttriLab / A-SOID

An active learning platform for expert-guided, data efficient discovery of behavior.
Other
55 stars 7 forks source link

Permission denied error when attempting to preprocess CALMS21 (PAPER) test data set #40

Closed vickerse1 closed 1 year ago

vickerse1 commented 1 year ago

Hi,

In Windows 10, ASOID now runs in streamlit successfully, but I get this error when I try to preprocess the test dataset provided on the github page:


PermissionError: [Errno 13] Permission denied: 'C:\\Users\\McCormick Lab\\Documents\\CaIMS21_dataset\\task1_classic_classification'
Traceback:
File "C:\ProgramData\Anaconda3\envs\asoid_b\lib\site-packages\streamlit\scriptrunner\script_runner.py", line 557, in _run_script
    exec(code, module.__dict__)
File "C:\ProgramData\Anaconda3\envs\asoid_b\lib\site-packages\asoid\app.py", line 332, in <module>
    main()
File "C:\ProgramData\Anaconda3\envs\asoid_b\lib\site-packages\asoid\app.py", line 328, in main
    application_function()
File "C:\ProgramData\Anaconda3\envs\asoid_b\lib\site-packages\asoid\apps\A_data_preprocess.py", line 19, in main
    processor.main()
File "C:\ProgramData\Anaconda3\envs\asoid_b\lib\site-packages\asoid\utils\load_preprocess.py", line 572, in main
    self.compile_data()
File "C:\ProgramData\Anaconda3\envs\asoid_b\lib\site-packages\asoid\utils\load_preprocess.py", line 438, in compile_data
    train = np.load(self.train_data_path, allow_pickle=True)
File "C:\ProgramData\Anaconda3\envs\asoid_b\lib\site-packages\numpy\lib\npyio.py", line 405, in load
    fid = stack.enter_context(open(os_fspath(file), "rb"))

I tried running locally to the ASOID install and got this error...so, I moved the test data folder to my users folder (documents), but I got the same error.

Do you have any ideas?

Thanks,

Evan

vickerse1 commented 1 year ago

I tried running in the ASOID/asoid folder, and the appearance of the app in streamlit in the browser now looks better and has a different color scheme somehow.

I still get the permissions error with the test data, even when I try to load it from either the ASOID or ASOID/asoid folder.

When I try to load my own data from a deeplabcut pose file, the labels are identified and it seems to be working, but then I get this indexing error:


IndexError: list index out of range
Traceback:
File "C:\ProgramData\Anaconda3\envs\asoid_b\lib\site-packages\streamlit\scriptrunner\script_runner.py", line 557, in _run_script
    exec(code, module.__dict__)
File "C:\ProgramData\Anaconda3\envs\asoid_b\lib\site-packages\asoid\app.py", line 332, in <module>
    main()
File "C:\ProgramData\Anaconda3\envs\asoid_b\lib\site-packages\asoid\app.py", line 328, in main
    application_function()
File "C:\ProgramData\Anaconda3\envs\asoid_b\lib\site-packages\asoid\apps\A_data_preprocess.py", line 19, in main
    processor.main()
File "C:\ProgramData\Anaconda3\envs\asoid_b\lib\site-packages\asoid\utils\load_preprocess.py", line 572, in main
    self.compile_data()
File "C:\ProgramData\Anaconda3\envs\asoid_b\lib\site-packages\asoid\utils\load_preprocess.py", line 458, in compile_data
    self.input_labelfiles.append(self.label_csvs[i].name) 

Can you help?

Thanks,

Evan

JensBlack commented 1 year ago

PermissionError: [Errno 13]

This can have multiple reasons:

  1. The path you are providing is ending in a folder: 'C:\Users\McCormick Lab\Documents\CaIMS21_dataset\task1_classic_classification' --> A-SOiD requires the full path (including the filename for this).
  2. This error can also happen when the file was opened by another software (e.g., annotation files in Excel) and is still open in the background.

But for your case, it is most likely the full path. The solution should look like this: grafik

JensBlack commented 1 year ago

I am reopening your three issues into separate issues to make it easier for others to find them.