[--enable-rft] ImportError: cannot import name '<class name>' from '<path to .py file>' (called from a .pyc file). #1437
Fretless14
started this conversation in
General
Replies: 1 comment
-
You can first obfuscate the scripts, make sure it works, then pack it. Please refer to |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm able to run pyarmor normally and without issues without enabling rft on my entire app (using the Pyinstaller-made executable). The app opens and runs normally. However, when enabling rft and trying to open the app, I get this error:
ImportError: cannot import name '<class name here>' from '<called python file here>' (<path to .pyc file that imports the class>)
This is what I'm using:
pyarmor gen --pack ./Build/dist/APP.app/Contents/MacOS/APP --enable-rft -r *.py* {" ".join(files_to_obf)}
(without --enable-rft it works just fine, but somehow pyarmor isn't refactoring the import statement to the obfuscated name in the pyc file?)
Am I doing something wrong or is this a bug? I'll be honest I'm quite lost on how to fix this, since it's all in the executable (as far as I understand).
Thank you!
-Michael
Beta Was this translation helpful? Give feedback.
All reactions