OpenTimelineIO icon indicating copy to clipboard operation
OpenTimelineIO copied to clipboard

Several adapters assume available_range is set on media references (FCP XML, EDL, SVG, more?)

Open reinecke opened this issue 6 years ago • 4 comments

When the FCP 7 XML adapter encounters a timeline where MediaReference objects have no available_range set (as common when loading EDLs), it errors out:

(redacted for brevity)
  File "/Users/username/envs/otiocppdev/lib/python3.7/site-packages/opentimelineio/adapters/fcp_xml.py", line 1483, in _build_file
    file_e.append(_build_rate(available_range.start_time.rate))
AttributeError: 'NoneType' object has no attribute 'start_time'

In this case, the adapter could fallback to the clip's source_range.

This also brings up some considerations generally about how the FCP XML adapter should be building file nodes in the XML, there is currently no resolution of two MediaReference instances with the same target_url but different available_range.

Relates to #627 - This area of code is strongly targeted at ExternalReference

reinecke avatar Dec 11 '19 01:12 reinecke

This OTIO file triggers this error.

no_source_range.tar.gz :

ssteinbach avatar Oct 12 '21 05:10 ssteinbach

The CMX EDL adapter appears to have the same bug.

ssteinbach avatar Oct 12 '21 05:10 ssteinbach

SVG adapter also has this bug in it:

https://github.com/PixarAnimationStudios/OpenTimelineIO/blob/aada787cdfcc2165a19cdcd46960ca5fe6d08d90/src/py-opentimelineio/opentimelineio/adapters/svg.py#L572

ssteinbach avatar Oct 13 '21 18:10 ssteinbach

Ohh. I'll look into fixing it this weekend.

KarthikRIyer avatar Oct 13 '21 18:10 KarthikRIyer