Invalid extension, no data found on windows for openwrt
hi, i install the pyarmor on windows and the code will run on openwrt. i runpyarmor -d obfuscate --platform musl.mips32.0 main.py, but the result is error:
DEBUG PyArmor installation path: d:\program files\python\python37\lib\site-packages\pyarmor
DEBUG PyArmor home path: C:\Users\fanqiang\.pyarmor
DEBUG Native platform is windows.x86_64
DEBUG Search dynamic library in the path: d:\program files\python\python37\lib\site-packages\pyarmor\platforms
DEBUG Loaded dynamic library: d:\program files\python\python37\lib\site-packages\pyarmor\platforms\windows\x86_64\_pytransform.dll
DEBUG The version of core library is (32, 6, 7)
INFO PyArmor Trial Version 6.4.0
INFO Target platforms: ['musl.mips32.0']
DEBUG Load platform list from d:\program files\python\python37\lib\site-packages\pyarmor\platforms\index.json
INFO Update target platforms to: ['musl.mips32.0']
INFO ====================================================
INFO Reload PyArmor with platform: windows.x86_64.0
INFO ====================================================
DEBUG PyArmor installation path: d:\program files\python\python37\lib\site-packages\pyarmor
DEBUG PyArmor home path: C:\Users\fanqiang\.pyarmor
DEBUG Native platform is windows.x86_64
INFO PYARMOR_PLATFORM is windows.x86_64.0
DEBUG Build platform is windows.x86_64.0
DEBUG Search dynamic library in the path: d:\program files\python\python37\lib\site-packages\pyarmor\platforms
DEBUG Search dynamic library in the path: C:\Users\fanqiang\.pyarmor\platforms
DEBUG Loaded dynamic library: C:\Users\fanqiang\.pyarmor\platforms\windows\x86_64\0\_pytransform.dll
DEBUG The version of core library is (32, 6, 0)
INFO Source path is "D:\webprojects\webpy"
INFO Entry scripts are ['main.py']
INFO Use cached capsule C:\Users\fanqiang\.pyarmor\.pyarmor_capsule.zip
INFO Search scripts mode: Normal
INFO Save obfuscated scripts to "dist"
INFO Read public key from capsule
INFO Obfuscate module mode is 2
INFO Obfuscate code mode is 1
INFO Wrap mode is 1
INFO Restrict mode is 1
INFO Advanced value is 0
INFO Super mode is False
INFO Generating runtime files to dist\pytransform
INFO Extract pytransform.key
INFO Generate default license file
DEBUG Load platform list from d:\program files\python\python37\lib\site-packages\pyarmor\platforms\index.json
DEBUG Target dynamic library: ['C:\\Users\\fanqiang\\.pyarmor\\platforms\\musl\\mips32\\0\\_pytransform.so']
INFO Copying C:\Users\fanqiang\.pyarmor\platforms\musl\mips32\0\_pytransform.so
INFO Patch library dist\pytransform\_pytransform.so
DEBUG Patching dist\pytransform\_pytransform.so
Traceback (most recent call last):
File "d:\program files\python\python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "d:\program files\python\python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "D:\Program Files\Python\Python37\Scripts\pyarmor.exe\__main__.py", line 7, in <module>
File "d:\program files\python\python37\lib\site-packages\pyarmor\pyarmor.py", line 1448, in main_entry
main(sys.argv[1:])
File "d:\program files\python\python37\lib\site-packages\pyarmor\pyarmor.py", line 1440, in main
args.func(args)
File "d:\program files\python\python37\lib\site-packages\pyarmor\pyarmor.py", line 671, in _obfuscate
suffix=suffix, supermode=supermode)
File "d:\program files\python\python37\lib\site-packages\pyarmor\utils.py", line 557, in make_runtime
copy3(filename, output)
File "d:\program files\python\python37\lib\site-packages\pyarmor\utils.py", line 537, in copy3
data = _patch_extension(target, keylist, suffix)
File "d:\program files\python\python37\lib\site-packages\pyarmor\utils.py", line 1298, in _patch_extension
raise RuntimeError('Invalid extension, no data found')
RuntimeError: Invalid extension, no data found
what is wrong with it.
Please run pyarmor download --upgrade to update dynamic libraries. Or remove the cached path
rm -rf ~/.pyarmor/platforms
Please run
pyarmor download --upgradeto update dynamic libraries. Or remove the cached pathrm -rf ~/.pyarmor/platforms
well, the libraries is the latest,and i remove all the cache, it also doesn't work with the result 'Invalid extension, no data found'.maybe i should run it on openwrt directly.
There is a bug for big-endian platform, I'm fixing it.
As a quick workaround, download this latest src/utils.py and replace the old utils.py in the pyarmor package.
As a quick workaround, download this latest src/utils.py and replace the old
utils.pyin the pyarmor package.
ok,thank you,it's work.