AcademySoftwareFoundation / AcademySoftwareFoundation/OpenTimelineIO

Confusing error when media_reference is missing

Open
#765 1 comment 0 reactions 0 assignees View on GitHub
help wanted
Dominant language
C++
Stars
2k
Forks
351
Avg merge
1d 12h
Merged PRs (30d)
1

Description

If you have a Clip without a media_reference, then you get this error when reading the file:
```
$ otiostat clip_missing_media_reference.otio
There was a system error: "While reading object named '' (of type 'opentimelineio::v1_0::Clip'): media_reference (near line 4583)"
```

There are two enhancements we could do here:
1. Make the error message better, for example: "Clip is missing required property 'media_reference' (near line 4583)"
2. Perhaps we could silently allow this, treating the media_reference as null, or MissingReference.

Here is a simple example:
[clip_missing_media_reference.otio.zip](https://github.com/PixarAnimationStudios/OpenTimelineIO/files/4949217/clip_missing_media_reference.otio.zip)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure with otiostat and the attached clip_missing_media_reference.otio example. Trace how the missing media_reference is reported while reading a Clip, then review the two proposed behaviors in the issue and confirm the selected behavior with a regression test. Done means the missing-property case has clear, intentional behavior and the confusing error is no longer produced.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.