question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Obfucation with PyArmor + PyInstaller

See original GitHub issue

Hello!

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:open
  • Created a year ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
MrVulcanocommented, May 6, 2022

I can help you with this error. Contact with me via telegram:

0reactions
Bebo0commented, May 18, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

How To Pack Obfuscated Scripts - PyArmor's Documentation
The obfuscated scripts generated by PyArmor can replace Python scripts seamlessly, but there is an issue when packing them into one bundle by...
Read more >
PyArmor - Pack to one single executable - Stack Overflow
I understand that PyArmor uses PyInstaller to pack its files. And PyInstaller has an option called --onefile . How can I pack my...
Read more >
PyArmor - Obfuscating Python Scripts
A command line tool used to obfuscate python scripts, bind obfuscated scripts to fixed machine or expire obfuscated scripts. How to Do Quick...
Read more >
How to Obfuscate Python Scripts With PyArmor
Obfuscating a Python script with PyArmor is as easy as running the following ... To start, you must have pyinstaller installed first:
Read more >
Errors when using PyInstaller by a custom way (not "pyarmor ...
So.. i have tried pyarmor obfuscate script.py to obfuscate my script, after that I ran pyinstaller on the file that got obfuscated with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found