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

ERROR unknown token error 3 #1977

Closed
hansroh opened this issue Nov 5, 2024 · 10 comments
Closed

ERROR unknown token error 3 #1977

hansroh opened this issue Nov 5, 2024 · 10 comments
Labels

Comments

@hansroh
Copy link

hansroh commented Nov 5, 2024

Suddenly, raised error today.

# foo.py
print ('IT WORKS')
pyarmor gen foo.py
INFO     Python 3.8.10
INFO     Pyarmor 9.0.3 (basic), 004815, KrackNet
INFO     Platform linux.x86_64
INFO     search inputs ...
INFO     find script foo.py
INFO     find 1 top resources
ERROR    unknown token error 3

cat pyarmor.error.log 
559675 MainProcess 2024-11-05 10:59:10,907
Traceback (most recent call last):
  File "/home/ubuntu/.local/lib/python3.8/site-packages/pyarmor/cli/__main__.py", line 767, in main
    main_entry(sys.argv[1:])
  File "/home/ubuntu/.local/lib/python3.8/site-packages/pyarmor/cli/__main__.py", line 755, in main_entry
    return args.func(ctx, args)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/pyarmor/cli/__main__.py", line 246, in cmd_gen
    builder.process(options)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/pyarmor/cli/generate.py", line 181, in process
    self.ctx.runtime_key = self.generate_runtime_key()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/pyarmor/cli/generate.py", line 95, in generate_runtime_key
    return Pytransform3.generate_runtime_key(self.ctx, outer)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/pyarmor/cli/core/__init__.py", line 105, in generate_runtime_key
    return m.generate_runtime_key(ctx, outer)
  File "<maker>", line 726, in generate_runtime_key
  File "<maker>", line 266, in build
RuntimeError: unknown token error 3

On Python 3.11, it is same.

pyarmor gen  foo.py
INFO     Python 3.11.0
INFO     Pyarmor 9.0.3 (basic), 004815, KrackNet
INFO     Platform linux.x86_64
INFO     search inputs ...
INFO     find script foo.py
INFO     find 1 top resources
ERROR    unknown token error 3

BUT my CI license is works fine.

I reregistered pyarmor, it dosen't work at all.

rm -rf ~/.pyarmor
pyarmor reg pyarmor-regfile-4815.zip
@hansroh hansroh added the bug label Nov 5, 2024
@CharlieGuo
Copy link

CharlieGuo commented Nov 5, 2024

Me too. Same issue.

INFO Python 3.11.7
INFO Pyarmor 9.0.3 (pro), ....
INFO Platform linux.x86_64
INFO search inputs ...
INFO find script .....
INFO find 1 top resources
ERROR unknown token error 3

@jakjarvis
Copy link

jakjarvis commented Nov 5, 2024

Same here - same trace and error log. Using Python v3.12.2 and Pyarmor v9.0.3 (basic license).

I've uninstalled/reinstalled pyarmor (including manually removing the pyarmor.cli.core site-packages) and rerun the license reg, but get the same results.

@jondy
Copy link
Contributor

jondy commented Nov 5, 2024

Hi all, do you check Pyarmor 9 upgrade notes #1958, and upgrade the regfile?

@jondy
Copy link
Contributor

jondy commented Nov 5, 2024

Reproduced, it's fixing...

@jakjarvis
Copy link

Hi Jondy,

My license was only activated last week, originally and currently on v9, and is not currently used in a CI/CD pipeline. On the day I activated it, I was able to use it on multiple machines (my local windows PC and our linux server). However today it returns the above error on my local PC, running exactly the same build commands as were used last week. From my understanding of the upgrade notes.

I don't believe any of the notes in #1958 are applicable here.

@2107708125
Copy link

I also have the same problem
INFO Python 3.11.9
INFO Pyarmor 9.0.3 (basic), 004842, mmc
INFO Platform windows.x86_64
INFO search inputs ...
INFO find script mmc.pyw
INFO find 1 top resources
ERROR unknown token error 3

7864 MainProcess 2024-11-05 13:22:35,772
Traceback (most recent call last):
File "C:\Program Files\Python311\Lib\site-packages\pyarmor\cli_main_.py", line 767, in main
main_entry(sys.argv[1:])
File "C:\Program Files\Python311\Lib\site-packages\pyarmor\cli_main_.py", line 755, in main_entry
return args.func(ctx, args)
^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\site-packages\pyarmor\cli_main_.py", line 246, in cmd_gen
builder.process(options)
File "C:\Program Files\Python311\Lib\site-packages\pyarmor\cli\generate.py", line 181, in process
self.ctx.runtime_key = self.generate_runtime_key()
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\site-packages\pyarmor\cli\generate.py", line 95, in generate_runtime_key
return Pytransform3.generate_runtime_key(self.ctx, outer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python311\Lib\site-packages\pyarmor\cli\core_init_.py", line 105, in generate_runtime_key
return m.generate_runtime_key(ctx, outer)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 726, in generate_runtime_key
File "", line 266, in build
RuntimeError: unknown token error 3

@jondy
Copy link
Contributor

jondy commented Nov 5, 2024

I have found the problem, it need update pyarmor.cli.core.

I'm building a quick fix version, it will be released in several hours.

Sorry for this issue.

@jondy
Copy link
Contributor

jondy commented Nov 5, 2024

Please upgrade pyarmor.cli.core to 7.6.1 to fix this issue. For example,

pip install pyarmor.cli.core~=7.6.1

@hansroh
Copy link
Author

hansroh commented Nov 5, 2024

It works!

@jakjarvis
Copy link

Works for me too - thanks for the quick fix Jondy!

@hansroh hansroh closed this as completed Nov 7, 2024
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

5 participants