rail-berkeley / rlkit

Collection of reinforcement learning algorithms
MIT License
2.5k stars 553 forks source link

while pass ‘render=True’ get 'Window rendering not supported' #45

Closed cww97 closed 5 years ago

cww97 commented 5 years ago
Traceback (most recent call last):
  File "oracle.py", line 70, in <module>
    use_gpu=True,  # Turn on if you have a GPU
  File "/home/cww97/rlkit/rlkit/launchers/launcher_util.py", line 594, in run_experiment
    **run_experiment_kwargs
  File "/home/cww97/rlkit/rlkit/launchers/launcher_util.py", line 175, in run_experiment_here
    return experiment_function(variant)
  File "/home/cww97/rlkit/rlkit/launchers/state_based_goal_experiments.py", line 108, in her_td3_experiment
    algorithm.train()
  File "/home/cww97/rlkit/rlkit/core/rl_algorithm.py", line 146, in train
    self.train_online(start_epoch=start_epoch)
  File "/home/cww97/rlkit/rlkit/core/rl_algorithm.py", line 167, in train_online
    observation = self._take_step_in_env(observation)
  File "/home/cww97/rlkit/rlkit/core/rl_algorithm.py", line 206, in _take_step_in_env
    self.training_env.render()
  File "/home/cww97/multiworld/multiworld/envs/mujoco/mujoco_env.py", line 124, in render
    self._get_viewer().render()
  File "/home/cww97/multiworld/multiworld/envs/mujoco/mujoco_env.py", line 133, in _get_viewer
    self.viewer = mujoco_py.MjViewer(self.sim)
  File "/home/cww97/.conda/envs/rlkit/lib/python3.5/site-packages/mujoco_py/mjviewer.py", line 133, in __init__
    super().__init__(sim)
  File "/home/cww97/.conda/envs/rlkit/lib/python3.5/site-packages/mujoco_py/mjviewer.py", line 26, in __init__
    super().__init__(sim)
  File "mujoco_py/mjrendercontext.pyx", line 278, in mujoco_py.cymj.MjRenderContextWindow.__init__
  File "mujoco_py/mjrendercontext.pyx", line 66, in mujoco_py.cymj.MjRenderContext.__init__
  File "mujoco_py/mjrendercontext.pyx", line 87, in mujoco_py.cymj.MjRenderContext._set_mujoco_buffers
RuntimeError: Window rendering not supported

ummmm

cww97 commented 5 years ago

opps, it seem that my code is not the newest one.

maybe I should pull

vitchyr commented 5 years ago

Please look this up online as it's not a problem specific to rlkit.