CCTV Apps Streamlit Notes
Array out of Bounds on Carousel Image Click
Testing with the first image in the carousel ``.
Changes to make_sidebar() function
The new make_sidebar() function call seems to expect a df returned, but we aren't actually returning anything. Here's the call and return statement from the old implementation:
# Function call:
chosen_model, selector, only_insp_defect, sewer_valid_df = make_sidebar(
models, utility_dict)
# Return section:
return model, select, only_insp_defect, sewer_valid_df
Then here's the new call. Nothing is returned, so sewer_valid_df is None:
sewer_valid_df = make_sidebar(models.items, utility_dict)
Currently, it seems that sewer_valid_df is instantiated in the Defects
(formerly Carousel) page itself.
The logic looks similar between the old (inside make_sidebar) and the new.
For some reason, maybe related to the carousel limiting to 1k images?, the selected image doesn't appear in the frame_ids array...
I think we're making multiple filtered sets from the original set of frames, and that's likely the issue. There might be some crossover of frames in the carousel that also exist in the sewer_valid_df, but the first few I looked at did not match.
RESOLVED
The issue was related to the use hack flag. We don't need the flag anymore, so I removed it and the section of code under the flag check.