Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Im getting a gymnasium.error.NameNotFound, why is that? #1457

Open
bull-stack opened this issue Nov 24, 2024 · 3 comments
Open

[Question] Im getting a gymnasium.error.NameNotFound, why is that? #1457

bull-stack opened this issue Nov 24, 2024 · 3 comments
Labels
question Further information is requested

Comments

@bull-stack
Copy link

Why is it that im getting this error, when i have added gym.register for the environment in the init.py

this is the error:

Traceback (most recent call last):
File "/media/bull/Data/Thesis/bin-picking-rl/isaacLab/bin_pick_sm.py", line 299, in
main()
File "/media/bull/Data/Thesis/bin-picking-rl/isaacLab/bin_pick_sm.py", line 247, in main
env_cfg: BinPickingEnvCfg = parse_env_cfg(
File "/media/bull/Data/isaac-sim/pkg/IsaacLab/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/utils/parse_cfg.py", line 120, in parse_env_cfg
cfg = load_cfg_from_registry(task_name, "env_cfg_entry_point")
File "/media/bull/Data/isaac-sim/pkg/IsaacLab/source/extensions/omni.isaac.lab_tasks/omni/isaac/lab_tasks/utils/parse_cfg.py", line 55, in load_cfg_from_registry
cfg_entry_point = gym.spec(task_name).kwargs.get(entry_point_key)
File "/media/bull/Data/isaac-sim/pkg/isaac-sim-4.2.0/exts/omni.isaac.ml_archive/pip_prebundle/gymnasium/envs/registration.py", line 1029, in spec
_check_version_exists(ns, name, version)
File "/media/bull/Data/isaac-sim/pkg/isaac-sim-4.2.0/exts/omni.isaac.ml_archive/pip_prebundle/gymnasium/envs/registration.py", line 393, in _check_version_exists
_check_name_exists(ns, name)
File "/media/bull/Data/isaac-sim/pkg/isaac-sim-4.2.0/exts/omni.isaac.ml_archive/pip_prebundle/gymnasium/envs/registration.py", line 370, in _check_name_exists
raise error.NameNotFound(
gymnasium.error.NameNotFound: Environment Isaac-Bin-Picking-UR10-IK-Abs doesn't exist.

@JoHo2410
Copy link

Same error here: For some reason, it always refers to the init.py file in the ~/miniconda3/envs/isaaclab/lib/python3.10/site-packages/gymnasium/envs folder. The locally generated init.py file like it is described in the IsaacLab docs, which is generated on the same level as the environment.py-file (here: bin_pick_sm.py). Can anybody say how to connect the environment file with the init.py file???

@RandomOakForest
Copy link
Collaborator

Thanks for posting this. Is the error found with Isaac Lab 1.3? Thanks

@RandomOakForest RandomOakForest added the question Further information is requested label Dec 6, 2024
@JoHo2410
Copy link

JoHo2410 commented Dec 6, 2024

Yes, the error is found in IsaacLab 1.3. I did also solve it now: I put my main and my train function as well as the environment configuration in the same python-file. Separating the environment file in a env.py and the training into a train.py and importing the environment into the train.py I did not have a problem anymore. I can't explain, why it is like that but now it works...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants