I’m currently running Isaac Lab on Windows 11, and when running the training examples there are no problems, but when I run play.py to check the training results I receive an error regardding onnx.
Training command: isaaclab.bat -p source\standalone\workflows\rsl_rl\train.py --task Isaac-Velocity-Rough-G1-v0 --headless
Check the training: isaaclab.bat -p source\standalone\workflows\rsl_rl\play.py --task Isaac-Velocity-Rough-G1-v0 --num_envs 32
Error:
Traceback (most recent call last):
File "c:/users/User/isaaclab/_isaac_sim/exts/omni.isaac.ml_archive/pip_prebundle/torch/onnx/_internal/onnx_proto_utils.py", line 223, in _add_onnxscript_fn
import onnx
File "C:\users\User\IsaacLab\_isaac_sim\kit\python\lib\site-packages\onnx\__init__.py", line 77, in <module>
from onnx.onnx_cpp2py_export import ONNX_ML
ImportError: DLL load failed while importing onnx_cpp2py_export: DLL 초기화 루틴을 실행할 수 없습니다.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\User\IsaacLab\source\standalone\workflows\rsl_rl\play.py", line 131, in <module>
main()
File "C:\Users\User\IsaacLab\source\standalone\workflows\rsl_rl\play.py", line 104, in main
export_policy_as_onnx(
File "c:\users\User\isaaclab\source\extensions\omni.isaac.lab_tasks\omni\isaac\lab_tasks\utils\wrappers\rsl_rl\exporter.py", line 39, in export_policy_as_onnx
policy_exporter.export(path, filename)
File "c:\users\User\isaaclab\source\extensions\omni.isaac.lab_tasks\omni\isaac\lab_tasks\utils\wrappers\rsl_rl\exporter.py", line 141, in export
torch.onnx.export(
File "c:/users/User/isaaclab/_isaac_sim/exts/omni.isaac.ml_archive/pip_prebundle/torch/onnx/utils.py", line 516, in export
_export(
File "c:/users/User/isaaclab/_isaac_sim/exts/omni.isaac.ml_archive/pip_prebundle/torch/onnx/utils.py", line 1687, in _export
proto = onnx_proto_utils._add_onnxscript_fn(
File "c:/users/User/isaaclab/_isaac_sim/exts/omni.isaac.ml_archive/pip_prebundle/torch/onnx/_internal/onnx_proto_utils.py", line 225, in _add_onnxscript_fn
raise errors.OnnxExporterError("Module onnx is not installed!") from e
torch.onnx.errors.OnnxExporterError: Module onnx is not installed!
I have tried uninstalling and reinstalling the onnx package, both within and outside of the virtual environment. I have also downgraded onnx to version 1.16.1 and am still getting this error.
Has anyone had a similar error or found a way to solve this? Thanks in advance!