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

AttributeError: 'VNCEnv' object has no attribute 'remote_manager' #129

Closed awwong1 closed 7 years ago

awwong1 commented 7 years ago

I come from How to Install OpenAI's Universe and Make a Game Bot [LIVE]. I am trying to run the following piece of code.

Expected behavior

Actual behavior

I am running into the error:

python demo.py 
[2017-01-23 23:38:28,119] Making new env: flashgames.CoasterRacer-v0
Traceback (most recent call last):
  File "demo.py", line 90, in <module>
    main()
  File "demo.py", line 36, in main
    observation_n = env.reset()
  File "/usr/local/lib/python2.7/site-packages/gym/core.py", line 123, in reset
    observation = self._reset()
  File "/Users/udia/sandbox/src/github.com/openai/universe/universe/wrappers/timer.py", line 15, in _reset
    return self.env.reset()
  File "/usr/local/lib/python2.7/site-packages/gym/core.py", line 123, in reset
    observation = self._reset()
  File "/Users/udia/sandbox/src/github.com/openai/universe/universe/wrappers/render.py", line 25, in _reset
    observation_n = self.env.reset()
  File "/usr/local/lib/python2.7/site-packages/gym/core.py", line 123, in reset
    observation = self._reset()
  File "/Users/udia/sandbox/src/github.com/openai/universe/universe/wrappers/throttle.py", line 42, in _reset
    observation = self.env.reset()
  File "/usr/local/lib/python2.7/site-packages/gym/core.py", line 123, in reset
    observation = self._reset()
  File "/Users/udia/sandbox/src/github.com/openai/universe/universe/envs/vnc_env.py", line 331, in _reset
    self._handle_connect()
  File "/Users/udia/sandbox/src/github.com/openai/universe/universe/envs/vnc_env.py", line 500, in _handle_connect
    for remote in self.remote_manager.pop(n=n):
AttributeError: 'VNCEnv' object has no attribute 'remote_manager'

Versions

Please include the result of running

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

Darwin Alexanders-MBP 15.6.0 Darwin Kernel Version 15.6.0: Mon Jan  9 23:07:29 PST 2017; root:xnu-3248.60.11.2.1~1/RELEASE_X86_64 x86_64
Python 2.7.13
Name: universe
Version: 0.21.2
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: /Users/udia/sandbox/src/github.com/openai/universe
Requires: autobahn, docker-py, docker-pycreds, fastzbarlight, go-vncdriver, gym, Pillow, PyYAML, six, twisted, ujson
---
Name: gym
Version: 0.7.2
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: /usr/local/lib/python2.7/site-packages
Requires: numpy, pyglet, requests, six
---
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/site-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/site-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/site-packages
Requires: olefile

Also, might be worth noting my version of Docker:

$ docker --version
Docker version 1.13.0, build 49bf474
tlbtlbtlb commented 7 years ago

You have to configure the environment before using it. See https://github.com/openai/universe#breaking-down-the-example. For your code, add env.configure(remotes=1) after line 35.