Js2Py icon indicating copy to clipboard operation
Js2Py copied to clipboard

AttributeError: 'RuntimeError' object has no attribute 'message'

Open PetterS opened this issue 6 years ago • 3 comments

"AttributeError: 'RuntimeError' object has no attribute 'message'" raised on the following line: https://github.com/PiotrDabkowski/Js2Py/blob/master/js2py/base.py#L1475

Should be easy to fix.

PetterS avatar Mar 05 '19 10:03 PetterS

import js2py import threading _js2py_lock = threading.RLock() with _js2py_lock: result = js2py.eval_js('var a = ' + js_code + ';').to_dict()

the js2py using global vars and it is not support multi-thread see: https://github.com/PiotrDabkowski/Js2Py/blob/master/js2py/es6/init.py also lock section is not a problem for performance - because the python working at single process, and at one single time executed only one thread (GIL)

jen-soft avatar Mar 15 '19 21:03 jen-soft

That is a good point, but this still seems like an error? RuntimeError is not guaranteed to have a message attribute.

PetterS avatar Mar 16 '19 13:03 PetterS

This still happens.

PetterS avatar May 06 '19 12:05 PetterS