[Error] [omni.ext.plugin] [ext: omni.isaac.repl-1.0.3] Failed to startup python extension

I tried to install Isaac REPL while following the tutorials, but it fails to start. It seems to be related to this:
ImportError: cannot import name ‘AnyFormattedText’ from ‘prompt_toolkit.formatted_text’

I’m running on Ubuntu 20.04, version 2022.2.1

Hi there,

can you provide the steps on how you are running into the issue?


Sure, although unfortunately it’s not particularly interesting. I was following the tutorials, and got to the point where it tells you to go to Window > Extensions, search for Isaac REPL, and toggle it on. When I do that, I get the error.


i enconuter the error:

2023-03-25 09:21:14 [5,503ms] [Error] [omni.ext._impl.custom_importer] Failed to import python module omni.isaac.repl. Error: cannot import name ‘get_event_loop’ from ‘prompt_toolkit.eventloop.utils’ (/home/anson/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/python/lib/python3.7/site-packages/prompt_toolkit/eventloop/utils.py). Traceback:
Traceback (most recent call last):
File “/home/anson/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/kernel/py/omni/ext/_impl/custom_importer.py”, line 76, in import_module
return importlib.import_module(name)
File “/home/anson/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/python/lib/python3.7/importlib/init.py”, line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 1006, in _gcd_import
File “”, line 983, in _find_and_load
File “”, line 967, in _find_and_load_unlocked
File “”, line 677, in _load_unlocked
File “”, line 728, in exec_module
File “”, line 219, in _call_with_frames_removed
File “/home/anson/.local/share/ov/pkg/isaac_sim-2022.2.1/exts/omni.isaac.repl/omni/isaac/repl/init.py”, line 10, in
from .extension import *
File “/home/anson/.local/share/ov/pkg/isaac_sim-2022.2.1/exts/omni.isaac.repl/omni/isaac/repl/extension.py”, line 16, in
from prompt_toolkit.eventloop.utils import get_event_loop
ImportError: cannot import name ‘get_event_loop’ from ‘prompt_toolkit.eventloop.utils’ (/home/anson/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/python/lib/python3.7/site-packages/prompt_toolkit/eventloop/utils.py)

2023-03-25 09:21:14 [5,503ms] [Error] [carb.scripting-python.plugin] Exception: Extension python module: ‘omni.isaac.repl’ in ‘/home/anson/.local/share/ov/pkg/isaac_sim-2022.2.1/exts/omni.isaac.repl’ failed to load.

/home/anson/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/kernel/py/omni/ext/_impl/_internal.py(189): startup
/home/anson/.local/share/ov/pkg/isaac_sim-2022.2.1/kit/kernel/py/omni/ext/_impl/_internal.py(285): startup_extension

2023-03-25 09:21:14 [5,503ms] [Error] [omni.ext.plugin] [ext: omni.isaac.repl-1.0.3] Failed to startup python extension.

same env: Ubuntu 20.04, version 2022.2.1

it’s my fault for changing python env.

Hi, I faced the same error.

It seems that prompt_toolkit has removed ‘get_event_loop()’ and replaced it with ‘get_running_loop()’ function in their recent 3.0.37 release: python-prompt-toolkit/CHANGELOG at 960df477c31adf53a3fff98a5c212c71fbfd7a3e · prompt-toolkit/python-prompt-toolkit · GitHub

Now I’m trying to revert my prompt_toolkit to 3.0.36 version

I tried something similar but that seemed to break other parts of the plugin. I was hoping that Nvidia would update the plugin to either use the new function, or require that it use prompt_toolkit <= 3.0.36 and figure out what other issues my result from that.

Let me know if you have any luck.

@ahaidu Any luck here?

By default in 2022.2.1 the repl extension should package all of its dependencies in the pip_prebundle folder:


and use prompt_toolkit-3.0.20

its possible that if a newer prompt_toolkit was installed in the local python env that it might cause issues. if you run ./python.sh -m pip list is there another prompt-toolkit package installed and if so, does uninstalling fix the issue?