pyaaf2 icon indicating copy to clipboard operation
pyaaf2 copied to clipboard

Error when opening aaf file

Open talosh opened this issue 2 years ago • 2 comments

Hi guys, having this error when parsing AAF:

Traceback (most recent call last): File "aaf_test.py", line 9, in with aaf2.open(sys.argv[1], 'r') as f: File "/Volumes/dl-tests/lucid/bl-pulls/aaf_test/pyaaf2/aaf2/file.py", line 200, in init self.metadict.read_properties() File "/Volumes/dl-tests/lucid/bl-pulls/aaf_test/pyaaf2/aaf2/metadict.py", line 470, in read_properties self.typedefs_by_name[typedef.type_name] = typedef AttributeError: 'AAFObject' object has no attribute 'type_name'

including the code lines 470 and 471 in "try: except:" block seem to bring a quick fix but might be worth investigating.

The aaf in question attached, it is made with the recent Avid 2021.9 and comes back just fine: TestMarkers.aaf.zip

Thank you!

talosh avatar Oct 07 '21 14:10 talosh

Looks like a new Type Definition got added ,something called a TypeDefinitionGenericCharacter. First time I've seen that, looks like it was added the SDK in 2018 on that avid2018 branch. I'll add it when I get a chance. Thanks for reporting!

markreidvfx avatar Oct 08 '21 03:10 markreidvfx

The updated data model is now in the dev branch, this should fix this issue.

markreidvfx avatar Jun 11 '22 14:06 markreidvfx