I have tried to obfuscate my python package using pyarmor Example : pyarmor obfuscate <package_name> Once the code has been obfuscated, I have build the docker image of the obfuscated code and deployed as docker container. But container throws error as Name Error: pyarmor not defined
I have checked out on the error and suggested that error might as below
No Bootstrap Code are executed before importing obfuscated scripts.
When creating new process by Popen or Process in mod subprocess or multiprocessing, to be sure that Bootstrap Code will be called before importing any obfuscated code in sub-process. Otherwise it will raise this exception. If pytransform.py or pytransform/init.py raises this exception. Make sure it is not obfuscated, it must be plain script. Also check system module os, ctypes, make sure they’re not obfuscated, try to use option --exclude to exclude the whole Python system library path.
can someone help to know what was the error and how to obfuscate py files and deploy in k8s or docker