I'm trying to write a code that extracts features from a catia part, I'm using pycatia library and win32com package. But no matter what code I try or what catia part I always get the same error which is '<win32com.gen_py.CATIA V5 InfInterfaces Object Library.Document instance at 0x2050022358848>' object has no attribute 'Part' and the most frustrating thing is that when i type dir(document) I can find 'part'
here's an example of a code that has the error:
from pycatia import catia
caa=catia()
documents = caa.documents
document = caa.active_document
part = document.part
in all the examples that i found online assigning document.part to a variable (in my example I named it part) is fondamental and I coudn't find a code that uses a different approach (there are codes that assign document.product but i get the same error: object doesn't have attribute 'Product')