list index out of range in return candidate_files[candidate_frames[0]]
Closed this issue Β· 14 comments
π STANDARDIZING INPUT DATA TO NIFTI:
Standardization complete β’ Elapsed time: 0:01:07
Traceback (most recent call last):
File "\Anaconda\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "\Anaconda\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "\Falcon\falconz_env\Scripts\falconz.exe_main.py", line 7, in
File "\Falcon\falconz_env\lib\site-packages\falconz\falconz.py", line 214, in main
start_frame_file = determine_candidate_frames(candidate_frames, reference_file, falcon_dir, actual_n_jobs)
File "\falconz_env\lib\site-packages\falconz\image_processing.py", line 441, in determine_candidate_frames
return candidate_files[candidate_frames[0]]
IndexError: list index out of range
Hi, there is an error when I try to run "falconz -d (dir) -r deformable" in falconz 2.0.27.
If you have any ideas for solving this, please let me know. Thanks!
Hi @LalithShiyam,
Thank you for your prompt reply.
I think data is not a problem because falcon works on my Windows PC for the same datasets, but not on this Windows workstation.
-python version: Python 3.9.16
-OS: Windows 10 Pro for Workstations
Do you have permission errors? When you create the environment? Try c3d --h
in your environment and let me know what you see.
The issue happens in windows often. When you are in a shared resource - e.g: a server or workstation.
@Keyn34 has more experience in this. But it really looks like a permission error, where you don't have permissions to run the binaries downloaded by falcon
. We do have a set permissions function, but this doesn't seem to help.
I would wait for @Keyn34's response, as he dealt with it often. But AFAIK there was no clear solution. I might be wrong though.
Cheers,
Lalith
Hi Lalith,
Yes, I agree, it should be related to permission to run the binaries. Because "c3d --h
'c3d' is not recognized as an internal or external command,
operable program or batch file."
I'm looking forward to the further response, and I may try to set the binaries dir to the environment variables to see if it helps.
Thank you!
Good, I would also see how you could fix the permission issues. We would be googling as well ππΌ
Hi @christanmod, this is a problem we usually encounter when the user settings and permissions within Windows are not 100% resolved. To fix this, a few restarts and editing the registry might be necessary.
A quicker but not guaranteed fix you could try first is the following:
- In the
venv
directory you have installedfalconz
, navigate to thesite-packages
folder and search forfalconz
. - Within this folder, locate
file_utilities.py
. Open it and search forset_permission()
. - Exchange this line in the located function with a simple
pass
. - Save the file and try running
falconz
again as before.
Let me know if this works! Thanks
Hi @Keyn34 ,
Thank you for your reply.
This solution works for my own PC like in issue #52.
But for the workstation it doesn't work, it was frozen for several hours without error info if I only passed the line in set_permission, and c3d --h still gave error.
After that, I tried to put the directory of binaries into the environment variable. Then it worked.
Hope this information is helpful to you.
Hi @christanmod fantastic. Would you be kind enough to mention the steps you did or even make an addition to readme as a PR. We are planning to make a FAQ section and we could include this there.
Cheers,
Lalith
Dude you are awesome @christanmod! Merged and happy to welcome you as a contributor to FALCONπ!
@all-contributors please add @christanmod for documentation
I've put up a pull request to add @christanmod! π
@all-contributors please add @christanmod for documentation
Thank you!
@christanmod already contributed before to doc