Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] .pyarmor_runtime import __pyarmor__ when using Outer license #1538

Closed
parseltongued opened this issue Oct 17, 2023 · 2 comments
Closed
Labels

Comments

@parseltongued
Copy link

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
@jondy
Copy link
Contributor

jondy commented Oct 18, 2023

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
Copy link
Contributor

jondy commented Oct 18, 2023

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

@jondy jondy closed this as completed Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants