AcademySoftwareFoundation / OpenTimelineIO

Open Source API and interchange format for editorial timeline information.
http://opentimeline.io
Apache License 2.0
1.45k stars 287 forks source link

Sample Python code throws an error #1694

Closed mm3509 closed 7 months ago

mm3509 commented 7 months ago

Bug Report

Incorrect Functionality and General Questions

The README.md shows sample usage in Python:

import opentimelineio as otio

timeline = otio.adapters.read_from_file("foo.aaf")
for clip in timeline.find_clips():
  print(clip.name, clip.duration())

when I run that, I get:

AttributeError: 'opentimelineio._otio.SerializableCollection' object has no attribute 'find_clips'

To Reproduce

  1. Operating System: macOS Big Sur
  2. Python version 3.11.6
  3. OpenTimelineIO release version 0.15.0
  4. Compiler information:
Apple clang version 13.0.0 (clang-1300.0.29.30)
Target: x86_64-apple-darwin20.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Expected Behavior

I expected the sample code to run without errors.

JeanChristopheMorinPerso commented 7 months ago

Hi @miguelmorin, the default README is from the tip of the main branch, not the released OTIO. You can see the released one at https://github.com/AcademySoftwareFoundation/OpenTimelineIO/tree/v0.15.

So the actual readme is accurate since find_clips will be present in a yet to be released OTIO.

reinecke commented 7 months ago

Closing because the mismatch will disappear with the 0.16.0 release.