What's Happening
All five index-based getter functions in load_config.py accept an index argument but perform no bounds checking before accessing the underlying file list. Passing an out-of-range index results in a raw, unhelpful Python IndexError with no context about what valid values actually are — making debugging unnecessarily painful for users.
The affected functions are:
get_image_path() — lines 30–35
get_raw_data_path() — lines 37–42
get_shapefile_path() — lines 44–49
get_ground_truth_path() — lines 51–56
get_aligned_data_path() — lines 58–63
Steps to Reproduce
Call any of the above functions with an index that exceeds the length of the configured file list. The function will crash immediately with a generic IndexError and no indication of what the valid range is.
What's Happening
All five index-based getter functions in
load_config.pyaccept anindexargument but perform no bounds checking before accessing the underlying file list. Passing an out-of-range index results in a raw, unhelpful PythonIndexErrorwith no context about what valid values actually are — making debugging unnecessarily painful for users.The affected functions are:
get_image_path()— lines 30–35get_raw_data_path()— lines 37–42get_shapefile_path()— lines 44–49get_ground_truth_path()— lines 51–56get_aligned_data_path()— lines 58–63Steps to Reproduce
Call any of the above functions with an index that exceeds the length of the configured file list. The function will crash immediately with a generic
IndexErrorand no indication of what the valid range is.