markreidvfx / pyaaf

Python Bindings for the Advanced Authoring Format (AAF)
http://markreidvfx.github.io/pyaaf
MIT License
49 stars 9 forks source link

CDCIDescriptor object has no attribute "locators" #17

Closed ylathouris closed 8 years ago

ylathouris commented 9 years ago

The documentation says the aaf.essence.EssenceDescriptor object has a method locators(). It also says the aaf.essence.CDCIDescriptor object inherits from aaf.essence.DigitalImageDescriptor which inherits from aaf.essence.FileDescriptor which inherits from aaf.essence.EssenceDescriptor. Therefore the aaf.essence.CDCIDescriptor should also have the method locators(), right?

raw_descriptor = raw_source_mob.essence_descriptor
for raw_locator in raw_descriptor.locators():
    print raw_locator.path

The code snippet above yields the following error:

AttributeError: 'aaf.essence.CDCIDescriptor' object has no attribute 'locators'

Is this a bug?

markreidvfx commented 9 years ago

That is correct, it should be there. Are you using the latest? Seems to work for me, what happen if you try

import aaf
f = aaf.open()
desc = f.create.CDCIDescriptor()
print desc.locators()

it should print

<aaf.iterator.LocatorIter object at 0x1021d7cf8>