Skip to content

[BUG] AttributeError: 'EnumDict' object has no attribute '_member_names' #2116

@CryptobotsDEV

Description

@CryptobotsDEV

I’m reaching out to report a compatibility issue with Pyarmor 9.1.3 (basic license) when used with Python 3.13.2 and 3.13.3 on Windows 11. The issue causes a runtime error in obfuscated executables, and I’d like to share details to help improve Pyarmor’s support for Python 3.13.

When obfuscating a Python script that uses the standard enum module (e.g., from enum import Enum) and packaging it into an executable with PyInstaller 6.12.0, the resulting executable fails with: AttributeError: 'EnumDict' object has no attribute '_member_names'

The error does not occur when running the unobfuscated script or packaging with PyInstaller alone (without Pyarmor). Also the same code works perfectly with Pyarmor 9.1.3 on Python 3.12.10 and Python 3.12.1, suggesting a compatibility issue with Python 3.13’s enum module (possibly changes to EnumDict internals). It also works fine on even older Python versions. Mentioned Python versions are the only ones I tested, cannot tell for others.

Looking forward to this being fixed, as upgrading to latest Python would be great.

from enum import Enum
import time

class DIRECTION(Enum):
BUY = 0
SELL = 1

print(DIRECTION.BUY)
print(DIRECTION.SELL)
time.sleep(10)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions