Skip to content

AttributeError: '00XMLFile' object has no attribute 'is_encrypted' in Python 3.12 #94

@sandeepsandeepnr

Description

@sandeepsandeepnr

Issue:
After updating to Python 3.12, I encountered an AttributeError when trying to use the is_encrypted() method with msoffcrypto-tool version 4.4.0. The object returned was of type 00XMLFile, which does not seem to support the is_encrypted() method.

Error:
AttributeError: '00XMLFile' object has no attribute 'is_encrypted

Code:

import msoffcrypto

try:
with open(encrypted, 'rb') as f:
file = msoffcrypto.OfficeFile(f)
print(type(file)) # Check if this is the correct object
print(file.is_encrypted()) # Try checking encryption
except Exception as e:
print(f"Error: {e}")

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions