You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this line of code in my JavaScript " return new Uint8Array(atob(tsv).split("").map(n => n.charCodeAt(0)))
"causing an error
async def get_xcvi():
ctx = MiniRacer()
ctx.eval(js_code)
promise = ctx.eval("new Promise((res, rej) => res(get_xct()))")
res = await promise
print(res)
Expected behavior
Tell us what should happen
Actual behavior
Traceback (most recent call last):
File "J:\code\nbBotTest\nbBotTest\moduleTest\x_spider.py", line 116, in
asyncio.run(get_xcvi())
File "C:\Program Files\Python312\Lib\asyncio\runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\asyncio\base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "J:\code\nbBotTest\nbBotTest\moduleTest\x_spider.py", line 81, in get_xcvi
res = await promise
^^^^^^^^^^^^^
File "J:\code\nbBotTest\nbBotTest.venv\Lib\site-packages\py_mini_racer_objects.py", line 226, in _do_await
return self._unpack_promise_results(results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "J:\code\nbBotTest\nbBotTest.venv\Lib\site-packages\py_mini_racer_objects.py", line 262, in _unpack_promise_results
raise JSPromiseError(result)
py_mini_racer._objects.JSPromiseError: JavaScript rejected promise with reason: ReferenceError: atob is not defined
at :253:13
at a (:254:9)
at get_xct (:263:21)
at :1:31
at new Promise ()
at :1:1
System configuration
PyMiniRacer 0.12.4:
Python 312:
The text was updated successfully, but these errors were encountered:
Steps to reproduce
I have this line of code in my JavaScript " return new Uint8Array(atob(tsv).split("").map(n => n.charCodeAt(0)))
"causing an error
async def get_xcvi():
ctx = MiniRacer()
ctx.eval(js_code)
promise = ctx.eval("new Promise((res, rej) => res(get_xct()))")
res = await promise
print(res)
Expected behavior
Tell us what should happen
Actual behavior
Traceback (most recent call last):
File "J:\code\nbBotTest\nbBotTest\moduleTest\x_spider.py", line 116, in
asyncio.run(get_xcvi())
File "C:\Program Files\Python312\Lib\asyncio\runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python312\Lib\asyncio\base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "J:\code\nbBotTest\nbBotTest\moduleTest\x_spider.py", line 81, in get_xcvi
res = await promise
^^^^^^^^^^^^^
File "J:\code\nbBotTest\nbBotTest.venv\Lib\site-packages\py_mini_racer_objects.py", line 226, in _do_await
return self._unpack_promise_results(results)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "J:\code\nbBotTest\nbBotTest.venv\Lib\site-packages\py_mini_racer_objects.py", line 262, in _unpack_promise_results
raise JSPromiseError(result)
py_mini_racer._objects.JSPromiseError: JavaScript rejected promise with reason: ReferenceError: atob is not defined
at :253:13
at a (:254:9)
at get_xct (:263:21)
at :1:31
at new Promise ()
at :1:1
System configuration
PyMiniRacer 0.12.4:
Python 312:
The text was updated successfully, but these errors were encountered: