pyarmor icon indicating copy to clipboard operation
pyarmor copied to clipboard

[BUG] .pyarmor_runtime import __pyarmor__ when using Outer license

Open parseltongued opened this issue 3 years ago • 2 comments

Hi,

Had .pyarmor_runtime import _pyarmor_, RuntimeError: Success (1:10915) when using outer license to run pyspark. Tested without outer license works well.

Developer server #1 (pyarmor group)

  1. pyarmor gen --outer -r src
  2. pyarmor gen key -e 365
  3. copy dist/pyarmor.rkey to production server.

Production server Pyarmor 8.3.11 (trial), NTP server working. 4. copy pyarmor.rkey to /opt//pyarmor_runtime_0x60xx 5. run spark-submit

23/10/18 01:21:15 WARN NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Traceback (most recent call last):
  File "/opt/<model>/app.py", line 1, in <module>
    import <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 627, in _load_backward_compatible
  File "<frozen zipimport>", line 259, in load_module
  File "/opt/<model>/pyfiles/src.zip/<module>.py", line 2, in <module>
  File "/opt/<model>/pyarmor_runtime_0x60xx/__init__.py", line 2, in <module>
    from .pyarmor_runtime import __pyarmor__
RuntimeError: Success (1:10915)

Tried placing pyarmor.rkey in runtime package and by global var doesn't work.

Appreciate assistance, thank you.

$ pyarmor
INFO     Python 3.9.16
INFO     Pyarmor 8.3.11 (group), 0x60xx
INFO     Platform linux.x86_64

parseltongued avatar Oct 17 '23 17:10 parseltongued

It need internet connection to visit NTP server if using -e, it may be internet error.

Try to pyarmor gen key -e .365 to generate outer license.

jondy avatar Oct 18 '23 01:10 jondy

I don't think it's outer license issue, so I close it.

jondy avatar Oct 18 '23 04:10 jondy