ENHANCE-PET / FALCON

FALCON is a Python-based software application designed to facilitate PET motion correction, both for head and total-body scans. Our program is built around the fast 'greedy' registration toolkit, which serves as the registration engine. With FALCON, users can enjoy a streamlined experience for implementing motion correction.
GNU General Public License v3.0
36 stars 6 forks source link

list index out of range in return candidate_files[candidate_frames[0]] #53

Closed christanmod closed 3 months ago

christanmod commented 3 months ago

πŸ” 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!

LalithShiyam commented 3 months ago

Hi @christanmod,

I would need more info to help you out.

Etc.,

christanmod commented 3 months ago

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

LalithShiyam commented 3 months ago

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

christanmod commented 3 months ago

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!

LalithShiyam commented 3 months ago

Good, I would also see how you could fix the permission issues. We would be googling as well πŸ‘πŸΌ

Keyn34 commented 3 months ago

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:

Let me know if this works! Thanks

christanmod commented 3 months ago

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.

LalithShiyam commented 3 months ago

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

christanmod commented 3 months ago

Hi @LalithShiyam ,

I have added an additional Q&A.md, hope it helps.

Best regards, Zekai

LalithShiyam commented 3 months ago

Dude you are awesome @christanmod! Merged and happy to welcome you as a contributor to FALCONπŸ˜„!

LalithShiyam commented 3 months ago

@all-contributors please add @christanmod for documentation

allcontributors[bot] commented 3 months ago

@LalithShiyam

I've put up a pull request to add @christanmod! :tada:

christanmod commented 3 months ago

@all-contributors please add @christanmod for documentation

Thank you!

allcontributors[bot] commented 3 months ago

@christanmod

@christanmod already contributed before to doc