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

KeyError: 3 while importing js2py #324

Open
CS8867 opened this issue Mar 7, 2024 · 2 comments
Open

KeyError: 3 while importing js2py #324

CS8867 opened this issue Mar 7, 2024 · 2 comments

Comments

@CS8867
Copy link

CS8867 commented Mar 7, 2024

The error occurs below as follows -
Traceback (most recent call last):
File "C:\Users\chsubhed\Documents\Work\Tests\Python\test.py", line 1, in
import time, js2py
File "C:\Users\chsubhed\AppData\Local\Programs\Python\Python312\Lib\site-packages\js2py_init_.py", line 72, in
from .base import PyJsException
File "C:\Users\chsubhed\AppData\Local\Programs\Python\Python312\Lib\site-packages\js2py\base.py", line 2965, in
@js
^^
File "C:\Users\chsubhed\AppData\Local\Programs\Python\Python312\Lib\site-packages\js2py\base.py", line 165, in Js
return PyJsFunction(val, FunctionPrototype)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chsubhed\AppData\Local\Programs\Python\Python312\Lib\site-packages\js2py\base.py", line 1377, in init
cand = fix_js_args(func)
^^^^^^^^^^^^^^^^^
File "C:\Users\chsubhed\AppData\Local\Programs\Python\Python312\Lib\site-packages\js2py\utils\injector.py", line 27, in fix_js_args
code = append_arguments(six.get_function_code(func), ('this', 'arguments'))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\chsubhed\AppData\Local\Programs\Python\Python312\Lib\site-packages\js2py\utils\injector.py", line 121, in append_arguments
arg = name_translations[inst.arg]
~~~~~~~~~~~~~~~~~^^^^^^^^^^
KeyError: 3

python version = 3.12.0
pip version = 24.0

@4144
Copy link
Contributor

4144 commented Mar 8, 2024

python 3.12 not supported yet.
See #282

@josdejong
Copy link

Any news on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants