openai / gym-http-api

API to access OpenAI Gym from other languages via HTTP
MIT License
293 stars 142 forks source link

I meet a error #70

Open Charele opened 6 years ago

Charele commented 6 years ago

I start the gym_http_server, when I run example_agent.py,I get the error message on server console

Server starting at: http://127.0.0.1:5000

parthopdas commented 4 years ago

This issues appears to be on windows only.

It seems to due to pyglet attempting to access opengl state across multiple threads: first thread creating the viewer (initializing opengl through pyglet) and a different thread (from the next step) calling render which then calls opengl again.

can you try the following and see if it works for you - considering use case, i think is a good enough fix. image

the above fix works for me.