Bug 470950

Summary: OpenTimelineIO Project conversion failed
Product: [Applications] kdenlive Reporter: flolilo
Component: User Interface & MiscellaneousAssignee: Jean-Baptiste Mardelle <jb>
Status: RESOLVED FIXED    
Severity: normal CC: julius.kuenzel
Priority: NOR    
Version First Reported In: 23.04.1   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In: 25.04.0
Sentry Crash Report:

Description flolilo 2023-06-12 21:49:44 UTC
SUMMARY
Hello. I am not sure if this is a problem with my distro's packaging, with OpenTimelineIO or with kdenlive.

When trying to use `File` -> `OpenTimelineIO Export`, I get the following error message:

```
Traceback (most recent call last):
  File "/usr/bin/otioconvert", line 33, in <module>
    sys.exit(load_entry_point('OpenTimelineIO==0.15.0', 'console_scripts', 'otioconvert')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/opentimelineio/console/otioconvert.py", line 243, in main
    result_tl = otio.adapters.read_from_file(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/opentimelineio/adapters/__init__.py", line 137, in read_from_file
    return adapter.read_from_file(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/opentimelineio/adapters/adapter.py", line 119, in read_from_file
    result = self._execute_function(
             ^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/opentimelineio/plugins/python_plugin.py", line 153, in _execute_function
    return (getattr(self.module(), func_name)(**kwargs))
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/opentimelineio_contrib/adapters/kdenlive.py", line 237, in read_from_string
    raise RuntimeError("Can't find main tractor")
RuntimeError: Can't find main tractor
```

The timeline is one video track with one video clip and one audio track with a dozen audio clips; it plays back fine and it also renders without problems. Other, more complicated projects show the same behavior. It also fails when the timeline just includes the one video clip.

STEPS TO REPRODUCE
1. Create a timeline with any content
2. File -> OpenTimelineIO export
3. Save as .edl or .xml or ...

OBSERVED RESULT
Error message "OpenTimelineIO Project conversion failed" appears with python error message below.

EXPECTED RESULT
Being able to export the timeline in one of the offered formats.

SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9

ADDITIONAL INFORMATION
Installed package opentimelineio explicitly via pacman; current version is 0.15-3.