Skip to content

Feature Request: Add error handling for tile file opens in tile_merge.py #232

Description

@ZainAallii

Describe the problem

In tile_merge.py, Image.open() and OpenEXR.InputFile() calls have no error
handling. If a tile file is corrupt, missing, or fails to open for any reason, the
script crashes with a cryptic Python traceback that doesn't indicate which tile caused
the failure.

Proposed Solution

Wrap all tile file opens in try/except blocks with clear error messages identifying
which tile index and file path caused the failure:

  • Line 48: Image.open(tile_paths[0]) — first tile open in merge_tiles_pillow()
  • Line 63: Image.open(tile_paths[tile_index]) — tile loop open in merge_tiles_pillow()
  • Line 81: OpenEXR.InputFile(tile_paths[0]) — first tile open in merge_tiles_exr()
  • Line 102: OpenEXR.InputFile(tile_paths[tile_index]) — tile loop open in merge_tiles_exr()

Example Use Cases

  1. A tile render task failed silently and produced a corrupt output file — merge step
    should report exactly which tile failed instead of a generic Python error
  2. Disk space ran out mid-render leaving a partial tile file — clear error message
    helps diagnose the issue quickly

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions