Compile is success, but js2py won't run, ValueError
See original GitHub issueFile “F:\GithubProject\EraTranslatorBuild\Application.dist\js2py\base.py”, line 3011, in <module js2py.base>
File “F:\GithubProject\EraTranslatorBuild\Application.dist\js2py\base.py”, line 2990, in define_error_type
File “F:\GithubProject\EraTranslatorBuild\Application.dist\js2py\base.py”, line 164, in Js
File “F:\GithubProject\EraTranslatorBuild\Application.dist\js2py\base.py”, line 1383, in init
File “F:\GithubProject\EraTranslatorBuild\Application.dist\js2py\utils\injector.py”, line 29, in fix_js_args
ValueError: TypeError requires closure of length 0, not 1
test python code
import js2py js2py.eval_js(‘console.log( “Hello World!” )’)
compile command
python -m nuitka --standalone --follow-imports --plugin-enable=numpy test.py
Error message
Traceback (most recent call last): File “F:\GithubProject\ERATranslateHelper\test.dist\test.py”, line 1, in <module> File “<frozen importlib._bootstrap>”, line 983, in _find_and_load File “<frozen importlib._bootstrap>”, line 967, in _find_and_load_unlocked File “<frozen importlib._bootstrap>”, line 668, in _load_unlocked File “<frozen importlib._bootstrap>”, line 638, in load_backward_compatible File "F:\GithubProject\ERATranslateHelper\test.dist\js2py_init.py", line 72, in <module js2py> File “<frozen importlib._bootstrap>”, line 983, in _find_and_load File “<frozen importlib._bootstrap>”, line 967, in _find_and_load_unlocked File “<frozen importlib._bootstrap>”, line 668, in _load_unlocked File “<frozen importlib._bootstrap>”, line 638, in _load_backward_compatible File “F:\GithubProject\ERATranslateHelper\test.dist\js2py\base.py”, line 3011, in <module js2py.base> File “F:\GithubProject\ERATranslateHelper\test.dist\js2py\base.py”, line 2990, in define_error_type File “F:\GithubProject\ERATranslateHelper\test.dist\js2py\base.py”, line 164, in Js File “F:\GithubProject\ERATranslateHelper\test.dist\js2py\base.py”, line 1383, in init File “F:\GithubProject\ERATranslateHelper\test.dist\js2py\utils\injector.py”, line 29, in fix_js_args ValueError: TypeError requires closure of length 0, not 1
And I’m using python 3.7.2, with VS studio cpp compiler.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Add a example
I got
Type Error:arg 5 (closure) expect cell, found compiled_cell
.six.get_function_closure
return a compiled_cell after compiled,but js2py need a cell, I think the error needs to be solved by the developers of js2py.