Due to some autocomplete features in VSCode, I imported the python graphics library “turtle” by accident into the Hello World example of Isaac Sim. However, because of this the options to import the examples from the drop down menu in Isaac Sim disappear, and you get the following errors in the terminal when Isaac launches:
[Error] [omni.ext.impl._internal] Failed to import python module omni.isaac.examples.tests. Error: No module named '_tkinter'. Traceback:
Traceback (most recent call last):
File "/home/noshnosh/.local/share/ov/pkg/isaac_sim-2021.2.1/kit/plugins/bindings-python/omni/ext/impl/_internal.py", line 65, in import_module
return importlib.import_module(name)
File "/home/noshnosh/.local/share/ov/pkg/isaac_sim-2021.2.1/kit/python/lib/python3.7/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
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 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/noshnosh/.local/share/ov/pkg/isaac_sim-2021.2.1/exts/omni.isaac.examples/omni/isaac/examples/tests/__init__.py", line 17, in <module>
from .test_hello_world import *
File "/home/noshnosh/.local/share/ov/pkg/isaac_sim-2021.2.1/exts/omni.isaac.examples/omni/isaac/examples/tests/test_hello_world.py", line 18, in <module>
from omni.isaac.examples.hello_world import HelloWorld
File "/home/noshnosh/.local/share/ov/pkg/isaac_sim-2021.2.1/exts/omni.isaac.examples/omni/isaac/examples/hello_world/__init__.py", line 10, in <module>
from omni.isaac.examples.hello_world.hello_world import HelloWorld
File "/home/noshnosh/.local/share/ov/pkg/isaac_sim-2021.2.1/exts/omni.isaac.examples/omni/isaac/examples/hello_world/hello_world.py", line 13, in <module>
import turtle
File "/home/noshnosh/.local/share/ov/pkg/isaac_sim-2021.2.1/kit/python/lib/python3.7/turtle.py", line 107, in <module>
import tkinter as TK
File "/home/noshnosh/.local/share/ov/pkg/isaac_sim-2021.2.1/kit/python/lib/python3.7/tkinter/__init__.py", line 36, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ModuleNotFoundError: No module named '_tkinter'
2022-01-26 00:28:58 [16,323ms] [Error] [carb.scripting-python.plugin] Exception: Extension python module: 'omni.isaac.examples.tests' in '/home/noshnosh/.local/share/ov/pkg/isaac_sim-2021.2.1/exts/omni.isaac.examples/.' failed to load.
At:
/home/noshnosh/.local/share/ov/pkg/isaac_sim-2021.2.1/kit/plugins/bindings-python/omni/ext/impl/_internal.py(169): startup_all_extensions_in_module
/home/noshnosh/.local/share/ov/pkg/isaac_sim-2021.2.1/kit/plugins/bindings-python/omni/ext/impl/_internal.py(225): startup_all_extensions_in_module
PythonExtension.cpp::startup()(2): <module>
2022-01-26 00:28:58 [16,324ms] [Error] [omni.ext.plugin] [ext: omni.isaac.examples-0.1.17] Failed to process python module extension in '/home/noshnosh/.local/share/ov/pkg/isaac_sim-2021.2.1/exts/omni.isaac.examples/.'.
They disappear once the import is removed from the file. Then you also get the drop down menu for the examples back.