Obfucation with PyArmor + PyInstaller
See original GitHub issueHello!
I’m using Discum for a month now and it is amazing but when i obfuscate it with the command
pyarmor pack --clean -e " --onefile " auth.py
It throws this error everytime!
`Exception in thread Thread-19 (censored): Traceback (most recent call last): File “discum\importmanager.py”, line 11, in func KeyError: ‘SuperProperties’
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File “threading.py”, line 1009, in _bootstrap_inner File “threading.py”, line 946, in run File “<frozen controller>”, line 48, in censored File “<frozen censored>”, line 98, in enter File “<frozen discord>”, line -1, in init File “discum\discum.py”, line 89, in init File “discum\discum.py”, line 222, in getSuperProperties File “discum\importmanager.py”, line 13, in func ModuleNotFoundError: No module named ‘discum.start’`
I know it is an issue with the importmanager.py and i already checked the other closed issue but i wonder if somebody can help me out?
Issue Analytics
- State:
- Created a year ago
- Comments:7

Top Related StackOverflow Question
I can help you with this error. Contact with me via telegram:
I was seeing this issue too. I fixed it by manually adding the discum modules manually as hiddenimports (in the Analysis method) in the spec file:
hiddenimports=[‘discum.start’, ‘discum.start.superproperties’, ‘discum.start.login’, ‘discum.start.other’, ‘discum.gateway.messages’, ‘discum.gateway.messages’, ‘discum.gateway.messages.parse’],
Edit: the above didn’t work because pysintaller couldn’t recursively import all of discum’s submodules. This however works perfectly:
hiddenimports=collect_submodules("discum"),Hope this helps someone took me 3 days to get this to work because of silent errors