3

I'm trying a tutorial on Reinforcement learning wherein I'm currently trying to use gymnasium, mujoco, to train agents. I've installed mujoco and when I try to run the program, the sim window opens for a second and throws this error. Idk what I'm doing wrong.

import gymnasium as gym
import stable_baselines3
import imageio



env=gym.make('Humanoid-v4', render_mode='human')
obs=env.reset()
env.render()
print(obs)

BTW, I'm getting the output of print(obs) which returns a tensor. It's just the sim environment which is throwing this error.

Error Traceback

Traceback (most recent call last):
  File "C:\Users\krish\anaconda3\envs\learn\lib\site-packages\gymnasium\envs\mujoco\mujoco_rendering.py", line 337, in __del__
  File "C:\Users\krish\anaconda3\envs\learn\lib\site-packages\gymnasium\envs\mujoco\mujoco_rendering.py", line 330, in free
  File "C:\Users\krish\anaconda3\envs\learn\lib\site-packages\glfw\__init__.py", line 2358, in get_current_context
AttributeError: 'NoneType' object has no attribute 'glfwGetCurrentContext'
Vaikruta
  • 141
  • 8

0 Answers0