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
{{ message }}
Repository navigation
[Bug Report] VSCode Debugger not setting up correct Python environment #1500
I dont know if this error even is Isaac Lab related or if it is related to Isaac Sim or even VSCode, but since yesterday the VSCode debugger doesnt work anymore with the Isaac Lab Workspace. The error started to happen after I updated the Omniverse Cache to 2023.2.7, I tried to revert the update, but it did not change anything. I also tired to set up Isaac Lab and Isaac Sim again on two different machines, but i always get the same error. When executing the same script with the isaaclab.sh script everything works normally. It seems to me that the _isaac_lab/python.py script is not run with the debugger and the isaac interpreter is used directly, because of the console output i get (see down below). When i try to run my python script with that interpreter directly i get the same errors . I also tried adding an echo to the _isaac_lab/python.py, but it never got displayed in the console.
Steps to reproduce
Setup Isaac Sim and Isaac Lab without Conda
Open VSCode
Run Debugger (for example with Python: Train Environment config)
Exception has occurred: ModuleNotFoundError
No module named 'toml'
File "/home/adrian/Projects/IsaacLab/source/extensions/omni.isaac.lab/omni/isaac/lab/__init__.py", line 9, in <module>
import toml
File "/home/adrian/Projects/IsaacLab/source/standalone/workflows/rl_games/train.py", line 13, in <module>
from omni.isaac.lab.app import AppLauncher
ModuleNotFoundError: No module named 'toml'
Thanks for posting this. Something may have changed with that commit of Isaac Lab. Could you please try the release v1.3.0 (d603b67) commit? Thank you.
Still having the same issue, but I found a workaround for now.
I copied the part that sets up the python environmnet and exports other env variables from the _isaac_sim/python.sh script and added a new setup_python.sh script in the root isaaclab folder. Then I source this script in my .bashrc, you could probably also source it from a preLauchTask in vscode, but i couldnt figure out how to run the task in the same terminal as the lauch config.
setup_python.sh:
#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/_isaac_sim"
# MY_DIR="$(realpath -s "$SCRIPT_DIR")"
# Setup python env from generated file (generated by tools/repoman/build.py)
export CARB_APP_PATH=$SCRIPT_DIR/kit
export ISAAC_PATH=$SCRIPT_DIR
export EXP_PATH=$SCRIPT_DIR/apps
source ${SCRIPT_DIR}/setup_python_env.sh
# By default use our python, but allow overriding it by checking if PYTHONEXE env var is defined:
python_exe=${PYTHONEXE:-"${SCRIPT_DIR}/kit/python/bin/python3"}
if ! [[ -z "${CONDA_PREFIX}" ]]; then
echo "Warning: running in conda env, please deactivate before executing this script"
echo "If conda is desired please source setup_conda_env.sh in your python 3.10 conda env and run python normally"
fi
# Check if we are running in a docker container
if [ -f /.dockerenv ]; then
# Check for vulkan in docker container
if [[ -f "${SCRIPT_DIR}/vulkan_check.sh" ]]; then
${SCRIPT_DIR}/vulkan_check.sh
fi
fi
# Show icon if not running headless
export RESOURCE_NAME="IsaacSim"
# WAR for missing libcarb.so
export LD_PRELOAD=$SCRIPT_DIR/kit/libcarb.so
Following up on this, we don't see this issue on our side. Have you tried Isaac Lab 2.0 and Isaac Sim 4.5? Let us know if you need further help. Thanks.
Activity
RandomOakForest commentedon Dec 6, 2024
Thanks for posting this. Something may have changed with that commit of Isaac Lab. Could you please try the release v1.3.0 (d603b67) commit? Thank you.
adrian-sch commentedon Dec 6, 2024
Unfortunately still the same error.
RandomOakForest commentedon Dec 6, 2024
Ok, thanks, we will investigate.
godk1122 commentedon Dec 9, 2024
I have the same problem, looking forward to your reply, thanks!
balaprenithreddy commentedon Dec 16, 2024
I face the same issue, even with the latest release
adrian-sch commentedon Dec 16, 2024
Still having the same issue, but I found a workaround for now.
I copied the part that sets up the python environmnet and exports other env variables from the
_isaac_sim/python.shscript and added a newsetup_python.shscript in the root isaaclab folder. Then I source this script in my.bashrc, you could probably also source it from a preLauchTask in vscode, but i couldnt figure out how to run the task in the same terminal as the lauch config.setup_python.sh:
Add to
.bashrc:edit: added
/_isaac_simto SCRIPT_DIR variableRandomOakForest commentedon Jan 2, 2025
Thanks for posting this. We are looking into this issue and if we can provide a workaround soon.
RandomOakForest commentedon Feb 6, 2025
Following up on this, we don't see this issue on our side. Have you tried Isaac Lab 2.0 and Isaac Sim 4.5? Let us know if you need further help. Thanks.