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

not able to run command under the tag: After it finishes training, watch a video of the trained policy with python -m spinup.run test_policy data/installtest/installtest_s0 #408

Open
Skizzy-create opened this issue Feb 21, 2024 · 2 comments

Comments

@Skizzy-create
Copy link

Screenshot 2024-02-21 101829
Screenshot 2024-02-21 101912
The above screenshot presents the error I am facing while trying to see the video for the training.
the training went through, and I was able to see the training plot. but not the video,

The specific error message is attached in the screenshots and the text below

(spinningup) skizzy@R2D2:/mnt/d/RL-SpinningUp/spinningup$ python -m spinup.run test_policy data/installtest/installtest_s0


Loading from data/installtest/installtest_s0/pyt_save/model.pt.


/home/skizzy/conda/envs/spinningup/lib/python3.6/site-packages/gym/logger.py:30: UserWarning: WARN: Box bound precision lowered by casting to float32
  warnings.warn(colorize('%s: %s'%('WARN', msg % args), 'yellow'))
Logging data to /tmp/experiments/1708490755/progress.txt
libGL error: MESA-LOADER: failed to open swrast: /home/skizzy/conda/envs/spinningup/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /lib/x86_64-linux-gnu/libLLVM-15.so.1) (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
libGL error: failed to load driver: swrast
Traceback (most recent call last):
  File "/mnt/d/RL-SpinningUp/spinningup/spinup/utils/test_policy.py", line 153, in <module>
    run_policy(env, get_action, args.len, args.episodes, not(args.norender))
  File "/mnt/d/RL-SpinningUp/spinningup/spinup/utils/test_policy.py", line 121, in run_policy
    env.render()
  File "/home/skizzy/conda/envs/spinningup/lib/python3.6/site-packages/gym/core.py", line 235, in render
    return self.env.render(mode, **kwargs)
  File "/home/skizzy/conda/envs/spinningup/lib/python3.6/site-packages/gym/envs/box2d/lunar_lander.py", line 320, in render
    from gym.envs.classic_control import rendering
  File "/home/skizzy/conda/envs/spinningup/lib/python3.6/site-packages/gym/envs/classic_control/rendering.py", line 27, in <module>
    from pyglet.gl import *
  File "/home/skizzy/conda/envs/spinningup/lib/python3.6/site-packages/pyglet/gl/__init__.py", line 244, in <module>
    import pyglet.window
  File "/home/skizzy/conda/envs/spinningup/lib/python3.6/site-packages/pyglet/window/__init__.py", line 1880, in <module>
    gl._create_shadow_window()
  File "/home/skizzy/conda/envs/spinningup/lib/python3.6/site-packages/pyglet/gl/__init__.py", line 220, in _create_shadow_window
    _shadow_window = Window(width=1, height=1, visible=False)
  File "/home/skizzy/conda/envs/spinningup/lib/python3.6/site-packages/pyglet/window/xlib/__init__.py", line 165, in __init__
    super(XlibWindow, self).__init__(*args, **kwargs)
  File "/home/skizzy/conda/envs/spinningup/lib/python3.6/site-packages/pyglet/window/__init__.py", line 591, in __init__
    context = config.create_context(gl.current_context)
  File "/home/skizzy/conda/envs/spinningup/lib/python3.6/site-packages/pyglet/gl/xlib.py", line 204, in create_context
    return XlibContextARB(self, share)
  File "/home/skizzy/conda/envs/spinningup/lib/python3.6/site-packages/pyglet/gl/xlib.py", line 314, in __init__
    super(XlibContext13, self).__init__(config, share)
  File "/home/skizzy/conda/envs/spinningup/lib/python3.6/site-packages/pyglet/gl/xlib.py", line 218, in __init__
    raise gl.ContextException('Could not create GL context')
pyglet.gl.ContextException: Could not create GL context
Traceback (most recent call last):
  File "/home/skizzy/conda/envs/spinningup/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/home/skizzy/conda/envs/spinningup/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/mnt/d/RL-SpinningUp/spinningup/spinup/run.py", line 243, in <module>
    subprocess.check_call(args, env=os.environ)
  File "/home/skizzy/conda/envs/spinningup/lib/python3.6/subprocess.py", line 311, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/home/skizzy/conda/envs/spinningup/bin/python', '/mnt/d/RL-SpinningUp/spinningup/spinup/utils/test_policy.py', 'data/installtest/installtest_s0']' returned non-zero exit status 1.


@Lisalsj
Copy link

Lisalsj commented Jun 16, 2024

I encountered the same issue as you. Have you resolved it?

@Skizzy-create
Copy link
Author

I haven't been able to but it has to do something with openGL lib

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

No branches or pull requests

2 participants