openai / universe

Universe: a software platform for measuring and training an AI's general intelligence across the world's supply of games, websites and other applications.
https://universe.openai.com
MIT License
7.45k stars 956 forks source link

Can't Import Universe.... #163

Closed ryanshepard closed 6 years ago

ryanshepard commented 7 years ago

Expected behavior

i start up python in a terminal and import GYM successfully, then try import universe --> should import, but fails

Actual behavior

sheppc@sheppc:~$ sudo python Python 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4] on linux2 Type "help", "copyright", "credits" or "license" for more information.

import gym import universe Traceback (most recent call last): File "", line 1, in File "/home/sheppc/universe/universe/init.py", line 22, in from universe import error, envs File "/home/sheppc/universe/universe/envs/init.py", line 1, in import universe.envs.vnc_env File "/home/sheppc/universe/universe/envs/vnc_env.py", line 9, in from universe import error, pyprofile, rewarder, spaces, twisty, vectorized, vncdriver File "/home/sheppc/universe/universe/rewarder/init.py", line 1, in from universe.rewarder.rewarder_session import RewarderSession File "/home/sheppc/universe/universe/rewarder/rewarder_session.py", line 8, in from twisted.internet import defer, endpoints File "/usr/local/lib/python2.7/dist-packages/twisted/internet/endpoints.py", line 52, in from twisted.protocols.tls import TLSMemoryBIOFactory File "/usr/local/lib/python2.7/dist-packages/twisted/protocols/tls.py", line 63, in from twisted.internet._sslverify import _setAcceptableProtocols File "/usr/local/lib/python2.7/dist-packages/twisted/internet/_sslverify.py", line 38, in TLSVersion.TLSv1_1: SSL.OP_NO_TLSv1_1, AttributeError: 'module' object has no attribute 'OP_NO_TLSv1_1'

Versions

Please include the result of running

$ uname -a ; python --version; pip show universe gym tensorflow numpy go-vncdriver Pillow

sheppc@sheppc:~$ uname -a ; python --version; pip show universe gym tensorflow numpy go-vncdriver Pillow Linux sheppc 4.4.0-66-generic #87~14.04.1-Ubuntu SMP Fri Mar 3 17:32:36 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux Python 2.7.6 Name: universe Version: 0.21.4.dev0 Summary: Universe: a software platform for measuring and training an AI's general intelligence across the world's supply of games, websites and other applications. Home-page: https://github.com/openai/universe Author: OpenAI Author-email: universe@openai.com License: UNKNOWN Location: /home/sheppc/universe Requires: autobahn, docker-py, docker-pycreds, fastzbarlight, go-vncdriver, gym, Pillow, PyYAML, six, twisted, ujson

Name: gym Version: 0.8.0 Summary: The OpenAI Gym: A toolkit for developing and comparing your reinforcement learning agents. Home-page: https://github.com/openai/gym Author: OpenAI Author-email: gym@openai.com License: UNKNOWN Location: /home/sheppc/gym Requires: numpy, requests, six, pyglet

Name: numpy Version: 1.12.0 Summary: NumPy: array processing for numbers, strings, records, and objects. Home-page: http://www.numpy.org Author: NumPy Developers Author-email: numpy-discussion@scipy.org License: BSD Location: /usr/local/lib/python2.7/dist-packages Requires:

Name: go-vncdriver Version: 0.4.19 Summary: UNKNOWN Home-page: UNKNOWN Author: UNKNOWN Author-email: UNKNOWN License: UNKNOWN Location: /usr/local/lib/python2.7/dist-packages Requires: numpy

Name: Pillow Version: 4.0.0 Summary: Python Imaging Library (Fork) Home-page: http://python-pillow.org Author: Alex Clark (Fork Author) Author-email: aclark@aclark.net License: Standard PIL License Location: /usr/local/lib/python2.7/dist-packages Requires: olefile /usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/vendor/requests/packages/urllib3/util/ssl.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning. SNIMissingWarning /usr/local/lib/python2.7/dist-packages/pip-9.0.1-py2.7.egg/pip/vendor/requests/packages/urllib3/util/ssl.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning

tlbtlbtlb commented 7 years ago

Your installation of SSL is broken. You can probably reproduce with import twisted.internet. Follow the instructions at https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.

Pinnh commented 7 years ago

You need to upgrade your OpenSSL by: pip install pyOpenSSL --upgrade also pyOpenSSL needs dependencies: apt-get install -y libffi-dev libssl-dev

ryanshepard commented 7 years ago

@tlbtlbtlb Yes you are correct. @Pinnh your solution was simple and worked. I'm simply trying to run the Open AI Universe "check to see if it works" python program as follows:


import gym import universe # register the universe environments

env = gym.make('flashgames.DuskDrive-v0') env.configure(remotes=1) # automatically creates a local docker container observation_n = env.reset()

while True: action_n = [[('KeyEvent', 'ArrowUp', True)] for ob in observation_n] # your agent here observation_n, reward_n, done_n, info = env.step(action_n) env.render()


import gym import universe # register the universe environments

env = gym.make('flashgames.DuskDrive-v0')

!! These three lines of code were successful !!

!! This line of code failed !! env.configure(remotes=1) # automatically creates a local docker container

!! With the following error message !!

env.configure(remotes=1) Traceback (most recent call last): File "", line 1, in File "/home/sheppc/gym/gym/core.py", line 211, in configure raise error.Error("Env.configure has been removed in gym v0.8.0, released on 2017/03/05. If you need Env.configure, please use gym version 0.7.x from pip, or checkout the gym:v0.7.4 tag from git.") gym.error.Error: Env.configure has been removed in gym v0.8.0, released on 2017/03/05. If you need Env.configure, please use gym version 0.7.x from pip, or checkout the gym:v0.7.4 tag from git.

!! Any ideas? !!

ryanshepard commented 7 years ago

*Any ideas how to make work without rolling back Gym to an old rev?

Pinnh commented 7 years ago

roll back to old Gym is simple and fast: pip uninstall gym and pip install gym==0.7.4 Sorry, I also don't know how to run 'universe' with gym v0.8.0,I saw the gym code that seems no other solution ,or official guide

tlbtlbtlb commented 7 years ago

We'll release an update to universe to work with gym 0.8 soon. Until then, pin gym at 0.7.4

ryanshepard commented 7 years ago

No worries, just excited to eventually get everything functional! :)

Using gym 0.7.4 and can now import gym and universe and make it through the first couple steps of the example program, but won't run. I get the following output of running a python script with the code:

import gym import universe # register the universe environments

env = gym.make('flashgames.DuskDrive-v0') env.configure(remotes=1) # automatically creates a local docker container observation_n = env.reset()

while True: action_n = [[('KeyEvent', 'ArrowUp', True)] for ob in observation_n] # your agent here observation_n, reward_n, done_n, info = env.step(action_n) env.render()


CMD: sudo python openai_learn1.py #contains the code above


OUTPUT(results):

sheppc@h:~/openai$ sudo python openai_learn1.py [2017-03-18 13:41:47,885] Making new env: flashgames.DuskDrive-v0 [2017-03-18 13:41:47,992] Writing logs to file: /tmp/universe-3118.log [2017-03-18 13:41:48,122] Ports used: [] [2017-03-18 13:41:48,122] [0] Creating container: image=quay.io/openai/universe.flashgames:0.20.28. Run the same thing by hand as: docker run -p 5900:5900 -p 15900:15900 --cap-add SYS_ADMIN --ipc host --privileged quay.io/openai/universe.flashgames:0.20.28 [2017-03-18 13:41:50,130] Remote closed: address=localhost:15900 [2017-03-18 13:41:50,130] At least one sockets was closed by the remote. Sleeping 1s... [2017-03-18 13:41:51,131] Remote closed: address=localhost:15900 [2017-03-18 13:41:51,131] Remote closed: address=localhost:5900 [2017-03-18 13:41:51,132] At least one sockets was closed by the remote. Sleeping 1s... [2017-03-18 13:41:52,133] Remote closed: address=localhost:5900 [2017-03-18 13:41:52,133] Remote closed: address=localhost:15900 [2017-03-18 13:41:52,134] At least one sockets was closed by the remote. Sleeping 1s... universe-fTUNkh-0 | Setting VNC and rewarder password: openai [2017-03-18 13:41:53,135] Remote closed: address=localhost:15900 [2017-03-18 13:41:53,135] Remote closed: address=localhost:5900 [2017-03-18 13:41:53,136] At least one sockets was closed by the remote. Sleeping 1s... universe-fTUNkh-0 | [Sat Mar 18 20:41:53 UTC 2017] Waiting for /tmp/.X11-unix/X0 to be created (try 1/10) universe-fTUNkh-0 | [Sat Mar 18 20:41:53 UTC 2017] [/usr/local/bin/sudoable-env-setup] Disabling outbound network traffic for none universe-fTUNkh-0 | [init] [2017-03-18 20:41:53,755] Launching system_diagnostics_logger.py, recorder_logdir=/tmp/demo universe-fTUNkh-0 | [init] [2017-03-18 20:41:53,756] Launching reward_recorder.py, recorder_logdir=/tmp/demo universe-fTUNkh-0 | [init] [2017-03-18 20:41:53,758] Launching vnc_recorder.py, recorder_logdir=/tmp/demo universe-fTUNkh-0 | [init] [2017-03-18 20:41:53,761] PID 53 launched with command ['sudo', '-H', '-u', 'nobody', 'DISPLAY=:0', 'DBUS_SESSION_BUS_ADDRESS=/dev/null', '/app/universe-envs/controlplane/bin/controlplane.py', '--rewarder-port=15901'] [2017-03-18 13:41:54,138] Remote closed: address=localhost:5900 [2017-03-18 13:41:54,138] Remote closed: address=localhost:15900 [2017-03-18 13:41:54,138] At least one sockets was closed by the remote. Sleeping 1s... universe-fTUNkh-0 | [Sat Mar 18 20:41:54 UTC 2017] Waiting for /tmp/.X11-unix/X0 to be created (try 2/10) [2017-03-18 13:41:55,139] Remote closed: address=localhost:15900 [2017-03-18 13:41:55,139] Remote closed: address=localhost:5900 [2017-03-18 13:41:55,139] At least one sockets was closed by the remote. Sleeping 1s... universe-fTUNkh-0 | [tigervnc] universe-fTUNkh-0 | [tigervnc] Xvnc TigerVNC 1.7.0 - built Sep 8 2016 10:39:22 universe-fTUNkh-0 | [tigervnc] Copyright (C) 1999-2016 TigerVNC Team and many others (see README.txt) universe-fTUNkh-0 | [tigervnc] See http://www.tigervnc.org for information on TigerVNC. universe-fTUNkh-0 | [tigervnc] Underlying X server release 11400000, The X.Org Foundation universe-fTUNkh-0 | [tigervnc] universe-fTUNkh-0 | [tigervnc] Initializing built-in extension VNC-EXTENSION universe-fTUNkh-0 | [tigervnc] Initializing built-in extension Generic Event Extension universe-fTUNkh-0 | [tigervnc] Initializing built-in extension SHAPE universe-fTUNkh-0 | [tigervnc] Initializing built-in extension MIT-SHM universe-fTUNkh-0 | [tigervnc] Initializing built-in extension XInputExtension universe-fTUNkh-0 | [tigervnc] Initializing built-in extension XTEST universe-fTUNkh-0 | [tigervnc] Initializing built-in extension BIG-REQUESTS universe-fTUNkh-0 | [tigervnc] Initializing built-in extension SYNC universe-fTUNkh-0 | [tigervnc] Initializing built-in extension XKEYBOARD universe-fTUNkh-0 | [tigervnc] Initializing built-in extension XC-MISC universe-fTUNkh-0 | [tigervnc] Initializing built-in extension XINERAMA universe-fTUNkh-0 | [tigervnc] Initializing built-in extension XFIXES universe-fTUNkh-0 | [tigervnc] Initializing built-in extension RENDER universe-fTUNkh-0 | [tigervnc] Initializing built-in extension RANDR universe-fTUNkh-0 | [tigervnc] Initializing built-in extension COMPOSITE universe-fTUNkh-0 | [tigervnc] Initializing built-in extension DAMAGE universe-fTUNkh-0 | [tigervnc] Initializing built-in extension MIT-SCREEN-SAVER universe-fTUNkh-0 | [tigervnc] Initializing built-in extension DOUBLE-BUFFER universe-fTUNkh-0 | [tigervnc] Initializing built-in extension RECORD universe-fTUNkh-0 | [tigervnc] Initializing built-in extension DPMS universe-fTUNkh-0 | [tigervnc] Initializing built-in extension X-Resource universe-fTUNkh-0 | [tigervnc] Initializing built-in extension XVideo universe-fTUNkh-0 | [tigervnc] Initializing built-in extension XVideo-MotionCompensation universe-fTUNkh-0 | [tigervnc] Initializing built-in extension GLX universe-fTUNkh-0 | [tigervnc] universe-fTUNkh-0 | [tigervnc] Sat Mar 18 20:41:55 2017 universe-fTUNkh-0 | [tigervnc] vncext: VNC extension running! universe-fTUNkh-0 | [tigervnc] vncext: Listening for VNC connections on all interface(s), port 5900 universe-fTUNkh-0 | [tigervnc] vncext: created VNC server for screen 0 [2017-03-18 13:41:56,141] Remote closed: address=localhost:5900 [2017-03-18 13:41:56,141] Remote closed: address=localhost:15900 [2017-03-18 13:41:56,142] At least one sockets was closed by the remote. Sleeping 1s... universe-fTUNkh-0 | [tigervnc] [dix] Could not init font path element /usr/share/fonts/X11/Type1/, removing from list! universe-fTUNkh-0 | [tigervnc] [dix] Could not init font path element /usr/share/fonts/X11/75dpi/, removing from list! universe-fTUNkh-0 | [tigervnc] [dix] Could not init font path element /usr/share/fonts/X11/100dpi/, removing from list! universe-fTUNkh-0 | [init] [2017-03-18 20:41:56,408] init detected end of child process 16 with exit code 0, not killed by signal [2017-03-18 13:41:57,143] Remote closed: address=localhost:15900 [2017-03-18 13:41:57,143] At least one sockets was closed by the remote. Sleeping 1s... universe-fTUNkh-0 | [tigervnc] universe-fTUNkh-0 | [tigervnc] Sat Mar 18 20:41:57 2017 universe-fTUNkh-0 | [tigervnc] Connections: accepted: 172.17.0.1::42442 universe-fTUNkh-0 | [init] [2017-03-18 20:41:57,981] init detected end of child process 57 with exit code 0, not killed by signal [2017-03-18 13:41:58,145] Remote closed: address=localhost:15900 [2017-03-18 13:41:58,145] At least one sockets was closed by the remote. Sleeping 1s... universe-fTUNkh-0 | [nginx] 2017/03/18 20:41:58 [error] 66#66: 1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:15901/", host: "127.0.0.1:10003" universe-fTUNkh-0 | [nginx] 172.17.0.1 - openai [18/Mar/2017:20:41:58 +0000] "GET / HTTP/1.1" 502 182 "-" "-" universe-fTUNkh-0 | [tigervnc] universe-fTUNkh-0 | [tigervnc] Sat Mar 18 20:41:58 2017 universe-fTUNkh-0 | [tigervnc] Connections: closed: 172.17.0.1::42442 (Clean disconnection) universe-fTUNkh-0 | [tigervnc] EncodeManager: Framebuffer updates: 0 universe-fTUNkh-0 | [tigervnc] EncodeManager: Total: 0 rects, 0 pixels universe-fTUNkh-0 | [tigervnc] EncodeManager: 0 B (1:-nan ratio) universe-fTUNkh-0 | WebSocket server settings: universe-fTUNkh-0 | - Listen on :5898 universe-fTUNkh-0 | - Flash security policy server universe-fTUNkh-0 | - No SSL/TLS support (no cert file) universe-fTUNkh-0 | - proxying from :5898 to localhost:5900 [2017-03-18 13:41:59,147] Using the golang VNC implementation [2017-03-18 13:41:59,147] Using VNCSession arguments: {'subsample_level': 2, 'start_timeout': 7, 'fine_quality_level': 50, 'encoding': 'tight'}. (Customize by running "env.configure(vnc_kwargs={...})" [2017-03-18 13:41:59,150] [0] Connecting to environment: vnc://localhost:5900 password=openai. If desired, you can manually connect a VNC viewer, such as TurboVNC. Most environments provide a convenient in-browser VNC client: http://localhost:15900/viewer/?password=openai 2017/03/18 13:41:59 I0318 13:41:59.150957 3118 gymvnc.go:417] [0:localhost:5900] opening connection to VNC server 2017/03/18 13:41:59 I0318 13:41:59.154088 3118 gymvnc.go:550] [0:localhost:5900] connection established universe-fTUNkh-0 | [nginx] 2017/03/18 20:41:59 [info] 66#66: 1 client 172.17.0.1 closed keepalive connection universe-fTUNkh-0 | [tigervnc] universe-fTUNkh-0 | [tigervnc] Sat Mar 18 20:41:59 2017 universe-fTUNkh-0 | [tigervnc] Connections: accepted: 172.17.0.1::42480 universe-fTUNkh-0 | [tigervnc] SConnection: Client needs protocol version 3.8 universe-fTUNkh-0 | [tigervnc] SConnection: Client requests security type VncAuth(2) universe-fTUNkh-0 | [tigervnc] VNCSConnST: Server default pixel format depth 24 (32bpp) little-endian rgb888 universe-fTUNkh-0 | [tigervnc] VNCSConnST: Client pixel format depth 24 (32bpp) little-endian bgr888 universe-fTUNkh-0 | [nginx] 2017/03/18 20:41:59 [error] 66#66: 3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:15901/", host: "localhost:15900" universe-fTUNkh-0 | [nginx] 172.17.0.1 - openai [18/Mar/2017:20:41:59 +0000] "GET / HTTP/1.1" 502 182 "-" "AutobahnPython/0.17.2" [2017-03-18 13:41:59,280] [0:localhost:5900] Waiting on rewarder: failed to complete WebSocket handshake. Retry in 1s (slept 0s/7s): connection was closed uncleanly (WebSocket connection upgrade failed (502 - BadGateway)) universe-fTUNkh-0 | [nginx] 2017/03/18 20:41:59 [info] 66#66: 3 client 172.17.0.1 closed keepalive connection Traceback (most recent call last): File "openai_learn1.py", line 11, in env.render() File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 174, in render return self._render(mode=mode, close=close) File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 341, in _render return self.env.render(mode, close) File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 174, in render return self._render(mode=mode, close=close) File "/home/sheppc/universe/universe/wrappers/render.py", line 49, in _render return self.env.render(mode=mode, *args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 174, in render return self._render(mode=mode, close=close) File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 341, in _render return self.env.render(mode, close) File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 174, in render return self._render(mode=mode, close=close) File "/home/sheppc/universe/universe/envs/vnc_env.py", line 552, in _render self.vnc_session.render(self.connection_names[0]) go_vncdriver.Error: /tmp/pip-build-1cAn3k/go-vncdriver/.build/src/github.com/openai/go-vncdriver/main.go:387: go_vncdriver was installed without OpenGL support. See https://github.com/openai/go-vncdriver for details on how debug. [2017-03-18 13:41:59,320] Killing and removing container: id=3c87dbe4dbcf57236faec41c3197b56f80c2c786b5954c11323ba7364a36a918 [2017-03-18 13:42:00,284] [0:localhost:5900] Waiting on rewarder: failed to establish rewarder TCP connection. Retry in 3s (slept 1s/7s): Connection was refused by other side: 111: Connection refused.


RUNNING THE SAME PROGRAM A SECOND TIME (OUTPUT)


sheppc@h:~/openai$ sudo python openai_learn1.py [2017-03-18 13:45:29,210] Making new env: flashgames.DuskDrive-v0 [2017-03-18 13:45:29,217] Writing logs to file: /tmp/universe-3489.log [2017-03-18 13:45:29,231] Ports used: [] [2017-03-18 13:45:29,231] [0] Creating container: image=quay.io/openai/universe.flashgames:0.20.28. Run the same thing by hand as: docker run -p 5900:5900 -p 15900:15900 --cap-add SYS_ADMIN --ipc host --privileged quay.io/openai/universe.flashgames:0.20.28 [2017-03-18 13:45:30,206] Remote closed: address=localhost:5900 [2017-03-18 13:45:30,208] At least one sockets was closed by the remote. Sleeping 1s... universe-yHIbZ4-0 | Setting VNC and rewarder password: openai universe-yHIbZ4-0 | [Sat Mar 18 20:45:30 UTC 2017] Waiting for /tmp/.X11-unix/X0 to be created (try 1/10) universe-yHIbZ4-0 | [tigervnc] universe-yHIbZ4-0 | [tigervnc] Xvnc TigerVNC 1.7.0 - built Sep 8 2016 10:39:22 universe-yHIbZ4-0 | [tigervnc] Copyright (C) 1999-2016 TigerVNC Team and many others (see README.txt) universe-yHIbZ4-0 | [tigervnc] See http://www.tigervnc.org for information on TigerVNC. universe-yHIbZ4-0 | [tigervnc] Underlying X server release 11400000, The X.Org Foundation universe-yHIbZ4-0 | [tigervnc] universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension VNC-EXTENSION universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension Generic Event Extension universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension SHAPE universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension MIT-SHM universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension XInputExtension universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension XTEST universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension BIG-REQUESTS universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension SYNC universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension XKEYBOARD universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension XC-MISC universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension XINERAMA universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension XFIXES universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension RENDER universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension RANDR universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension COMPOSITE universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension DAMAGE universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension MIT-SCREEN-SAVER universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension DOUBLE-BUFFER universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension RECORD universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension DPMS universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension X-Resource universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension XVideo universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension XVideo-MotionCompensation universe-yHIbZ4-0 | [tigervnc] Initializing built-in extension GLX universe-yHIbZ4-0 | [tigervnc] universe-yHIbZ4-0 | [tigervnc] Sat Mar 18 20:45:30 2017 universe-yHIbZ4-0 | [tigervnc] vncext: VNC extension running! universe-yHIbZ4-0 | [tigervnc] vncext: Listening for VNC connections on all interface(s), port 5900 universe-yHIbZ4-0 | [tigervnc] vncext: created VNC server for screen 0 universe-yHIbZ4-0 | [tigervnc] [dix] Could not init font path element /usr/share/fonts/X11/Type1/, removing from list! universe-yHIbZ4-0 | [tigervnc] [dix] Could not init font path element /usr/share/fonts/X11/75dpi/, removing from list! universe-yHIbZ4-0 | [tigervnc] [dix] Could not init font path element /usr/share/fonts/X11/100dpi/, removing from list! universe-yHIbZ4-0 | [Sat Mar 18 20:45:30 UTC 2017] [/usr/local/bin/sudoable-env-setup] Disabling outbound network traffic for none universe-yHIbZ4-0 | [init] [2017-03-18 20:45:30,306] Launching system_diagnostics_logger.py, recorder_logdir=/tmp/demo universe-yHIbZ4-0 | [init] [2017-03-18 20:45:30,308] Launching reward_recorder.py, recorder_logdir=/tmp/demo universe-yHIbZ4-0 | [init] [2017-03-18 20:45:30,311] Launching vnc_recorder.py, recorder_logdir=/tmp/demo universe-yHIbZ4-0 | [init] [2017-03-18 20:45:30,339] PID 57 launched with command ['sudo', '-H', '-u', 'nobody', 'DISPLAY=:0', 'DBUS_SESSION_BUS_ADDRESS=/dev/null', '/app/universe-envs/controlplane/bin/controlplane.py', '--rewarder-port=15901'] universe-yHIbZ4-0 | [init] [2017-03-18 20:45:30,377] init detected end of child process 60 with exit code 0, not killed by signal universe-yHIbZ4-0 | WebSocket server settings: universe-yHIbZ4-0 | - Listen on :5898 universe-yHIbZ4-0 | - Flash security policy server universe-yHIbZ4-0 | - No SSL/TLS support (no cert file) universe-yHIbZ4-0 | - proxying from :5898 to localhost:5900 [2017-03-18 13:45:31,209] Remote closed: address=localhost:5900 [2017-03-18 13:45:31,210] Remote closed: address=localhost:15900 [2017-03-18 13:45:31,211] At least one sockets was closed by the remote. Sleeping 1s... universe-yHIbZ4-0 | [tigervnc] universe-yHIbZ4-0 | [tigervnc] Sat Mar 18 20:45:31 2017 universe-yHIbZ4-0 | [tigervnc] Connections: accepted: 172.17.0.1::42624 universe-yHIbZ4-0 | [nginx] 2017/03/18 20:45:31 [error] 66#66: 1 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:15901/", host: "127.0.0.1:10003" universe-yHIbZ4-0 | [nginx] 172.17.0.1 - openai [18/Mar/2017:20:45:31 +0000] "GET / HTTP/1.1" 502 182 "-" "-" universe-yHIbZ4-0 | [init] [2017-03-18 20:45:31,257] init detected end of child process 17 with exit code 0, not killed by signal [2017-03-18 13:45:32,212] Using the golang VNC implementation [2017-03-18 13:45:32,213] Using VNCSession arguments: {'subsample_level': 2, 'start_timeout': 7, 'fine_quality_level': 50, 'encoding': 'tight'}. (Customize by running "env.configure(vnc_kwargs={...})" universe-yHIbZ4-0 | [nginx] 2017/03/18 20:45:32 [info] 66#66: 1 client 172.17.0.1 closed keepalive connection universe-yHIbZ4-0 | [tigervnc] universe-yHIbZ4-0 | [tigervnc] Sat Mar 18 20:45:32 2017 universe-yHIbZ4-0 | [tigervnc] Connections: closed: 172.17.0.1::42624 (Clean disconnection) universe-yHIbZ4-0 | [tigervnc] EncodeManager: Framebuffer updates: 0 universe-yHIbZ4-0 | [tigervnc] EncodeManager: Total: 0 rects, 0 pixels universe-yHIbZ4-0 | [tigervnc] EncodeManager: 0 B (1:-nan ratio) [2017-03-18 13:45:32,220] [0] Connecting to environment: vnc://localhost:5900 password=openai. If desired, you can manually connect a VNC viewer, such as TurboVNC. Most environments provide a convenient in-browser VNC client: http://localhost:15900/viewer/?password=openai 2017/03/18 13:45:32 I0318 13:45:32.220989 3489 gymvnc.go:417] [0:localhost:5900] opening connection to VNC server 2017/03/18 13:45:32 I0318 13:45:32.226173 3489 gymvnc.go:550] [0:localhost:5900] connection established universe-yHIbZ4-0 | [tigervnc] Connections: accepted: 172.17.0.1::42636 universe-yHIbZ4-0 | [tigervnc] SConnection: Client needs protocol version 3.8 universe-yHIbZ4-0 | [tigervnc] SConnection: Client requests security type VncAuth(2) universe-yHIbZ4-0 | [tigervnc] VNCSConnST: Server default pixel format depth 24 (32bpp) little-endian rgb888 universe-yHIbZ4-0 | [tigervnc] VNCSConnST: Client pixel format depth 24 (32bpp) little-endian bgr888 Traceback (most recent call last): File "openai_learn1.py", line 11, in [2017-03-18 13:45:32,256] [0:localhost:5900] Waiting on rewarder: failed to complete WebSocket handshake. Retry in 1s (slept 0s/7s): connection was closed uncleanly (WebSocket connection upgrade failed (502 - BadGateway)) env.render() File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 174, in render return self._render(mode=mode, close=close) File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 341, in _render return self.env.render(mode, close) File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 174, in render return self._render(mode=mode, close=close) File "/home/sheppc/universe/universe/wrappers/render.py", line 49, in _render return self.env.render(mode=mode, *args, *kwargs) File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 174, in render return self._render(mode=mode, close=close) File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 341, in _render return self.env.render(mode, close) File "/usr/local/lib/python2.7/dist-packages/gym/core.py", line 174, in render return self._render(mode=mode, close=close) File "/home/sheppc/universe/universe/envs/vnc_env.py", line 552, in _render self.vnc_session.render(self.connection_names[0]) go_vncdriver.Error: /tmp/pip-build-1cAn3k/go-vncdriver/.build/src/github.com/openai/go-vncdriver/main.go:387: go_vncdriver was installed without OpenGL support. See https://github.com/openai/go-vncdriver for details on how debug. [2017-03-18 13:45:32,257] Killing and removing container: id=1f64436fd1f20f6ac9090f61cdb231109fb21c439b3be63d645a4e34c39ac974 universe-yHIbZ4-0 | [nginx] 2017/03/18 20:45:32 [error] 66#66: 3 connect() failed (111: Connection refused) while connecting to upstream, client: 172.17.0.1, server: , request: "GET / HTTP/1.1", upstream: "http://127.0.0.1:15901/", host: "localhost:15900" universe-yHIbZ4-0 | [nginx] 172.17.0.1 - openai [18/Mar/2017:20:45:32 +0000] "GET / HTTP/1.1" 502 182 "-" "AutobahnPython/0.17.2" universe-yHIbZ4-0 | [nginx] 2017/03/18 20:45:32 [info] 66#66: *3 client 172.17.0.1 closed keepalive connection [2017-03-18 13:45:33,261] [0:localhost:5900] Got error, but giving up on reconnecting, since 0 already disconnected

clemens-tolboom commented 7 years ago

I ran pip uninstall gym and pip install gym==0.7.4 which didn't help. It broke my DuskDrive. Trying to fix it I ran pip install gym and got gym-0.9.1.

Next I tried env = gym.make('flashgames.FormulaRacer-v0') which works.

Guess we can close this issue?