Skip to content

Issue : Lack of Robust Error Handling in Image Loading #56

@Adithyakp86

Description

@Adithyakp86

Description The load_image function in utility.py contains basic error handling but might not catch all edge cases. For example, cv.imread returns None if the file cannot be read, but this check is sometimes performed after other operations or relies on generic try-except blocks which might mask the actual error.

Solution

  • Check explicitly if image is None immediately after cv.imread.
  • Add specific exception handling for rawpy and other libraries.
  • improved file type validation before attempting to read.

Assign this issue to me under the OSCG

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions