markreidvfx/pyaaf

Invalid MobId 'Usage_TopLevel'

Closed this issue · 1 comments

Hi,
If try this....

`f = aaf.open(path, "rw")
header_base_aaf = f.header
storage_base_aaf = header_base_aaf.storage()
for comp_mob_i in storage_base_aaf.composition_mobs():
for comp_mob_keys in comp_mob_i.keys():
comp_mob_value = comp_mob_i.get_value(comp_mob_keys)

    if comp_mob_value == 'Usage_TopLevel':
        print 'here'`

I get this as an output.

Traceback (most recent call last):
File "test.py", line 134, in
if comp_mob_value == 'Usage_TopLevel':
File "aaf/util/MobID.pyx", line 91, in aaf.util.MobID.richcmp (aaf/util.cpp:8806)
File "aaf/util/MobID.pyx", line 13, in aaf.util.MobID.init (aaf/util.cpp:7446)
File "aaf/util/MobID.pyx", line 180, in aaf.util.MobID.urn.set (aaf/util.cpp:10164)
ValueError: Invalid MobId

Process finished with exit code 1

any ideas why I am getting that?
thanks in advance

I think I am meant to...
if str(comp_mob_value) == 'Usage_TopLevel':