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

Got mlagents.envs.exception.UnityEnvironmentException #14

Closed
seungjaeryanlee opened this Issue Jan 29, 2019 · 6 comments

Comments

Projects
None yet
5 participants
@seungjaeryanlee
Copy link

seungjaeryanlee commented Jan 29, 2019

Hello! Thank you for this great new environment! I was trying to install it on Ubuntu 16.04 and encountered problem when I tried to make an environment. I downloaded the correct environment file, so I assume that I added it incorrectly? Could you help me fix this issue?

Here is what I did:

  1. Setup conda environment (Python 3.6)
  2. Install ml-agents v0.6.0
  3. Install obstacle-tower-env
  4. Download environment (https://storage.googleapis.com/obstacle-tower-build/v1/obstacletower_v1_linux.zip)
  5. Unzip environment into ObstacleTower/
  6. Run the following command:
>>> from obstacle_tower_env import ObstacleTowerEnv
>>> env = ObstacleTowerEnv('./ObstacleTower/obstacletower', retro=False)

Here is the full output:

Python 3.6.7 | packaged by conda-forge | (default, Nov 21 2018, 03:09:43)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from obstacle_tower_env import ObstacleTowerEnv
>>> env = ObstacleTowerEnv('./ObstacleTower/obstacletower', retro=False)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/ryanlee/git/obstacle-tower-env/obstacle_tower_env.py", line 38, in __init__
    self._env = UnityEnvironment(environment_filename, worker_id, docker_training=docker_training)
  File "/home/ryanlee/git/ml-agents/ml-agents/mlagents/envs/environment.py", line 58, in __init__
    self.executable_launcher(file_name, docker_training, no_graphics)
  File "/home/ryanlee/git/ml-agents/ml-agents/mlagents/envs/environment.py", line 172, in executable_launcher
    .format(true_filename))
mlagents.envs.exception.UnityEnvironmentException: Couldn't launch the obstacletower environment. Provided filename does not match any environments.

Here is pip freeze:

absl-py==0.7.0
astor==0.7.1
atomicwrites==1.2.1
attrs==18.2.0
backcall==0.1.0
bleach==3.1.0
certifi==2018.11.29
chardet==3.0.4
cycler==0.10.0
decorator==4.3.2
defusedxml==0.5.0
docopt==0.6.2
entrypoints==0.3
future==0.17.1
gast==0.2.2
grpcio==1.11.1
gym==0.10.9
gym-unity==0.1.1
html5lib==0.9999999
idna==2.8
ipykernel==5.1.0
ipython==7.2.0
ipython-genutils==0.2.0
ipywidgets==7.4.2
jedi==0.13.2
Jinja2==2.10
jsonschema==3.0.0a3
jupyter==1.0.0
jupyter-client==5.2.4
jupyter-console==6.0.0
jupyter-core==4.4.0
kiwisolver==1.0.1
Markdown==3.0.1
MarkupSafe==1.1.0
matplotlib==3.0.2
mistune==0.8.4
-e git+https://github.com/Unity-Technologies/ml-agents.git@d3f9fd63043f1c82790d3fe35ee07dc5ed1232b9#egg=mlagents&subdirectory=ml-agents
more-itertools==5.0.0
nb-conda==2.2.1
nb-conda-kernels==2.2.0
nbconvert==5.4.0
nbformat==4.4.0
notebook==5.7.4
numpy==1.14.5
-e git+https://github.com/Unity-Technologies/obstacle-tower-env.git@8372165df1ef5678f814bc7425236cf0ea2a68ac#egg=obstacle_tower_env
pandocfilters==1.4.2
parso==0.3.2
pexpect==4.6.0
pickleshare==0.7.5
Pillow==5.2.0
pkginfo==1.4.2
pluggy==0.8.1
prometheus-client==0.5.0
prompt-toolkit==2.0.8
protobuf==3.6.1
ptyprocess==0.6.0
py==1.7.0
pyglet==1.3.2
Pygments==2.3.1
pyparsing==2.3.1
pyrsistent==0.14.9
pytest==3.10.1
python-dateutil==2.7.5
PyYAML==3.13
pyzmq==17.1.2
qtconsole==4.4.3
requests==2.21.0
scipy==1.2.0
Send2Trash==1.5.0
six==1.12.0
tensorboard==1.7.0
tensorflow==1.7.1
termcolor==1.1.0
terminado==0.8.1
testpath==0.4.2
tornado==5.1.1
traitlets==4.3.2
twine==1.11.0
urllib3==1.24.1
wcwidth==0.1.7
webencodings==0.5.1
Werkzeug==0.14.1
widgetsnbextension==3.4.2

Thank you for your help!

@seungjaeryanlee

This comment has been minimized.

Copy link
Author

seungjaeryanlee commented Jan 29, 2019

It seems like the zipped file does not have a correct extension: upon changing obstacletower to obstacletower.x86_64, the error disappears.

This block of code from ML-agents is the most relevant:

        if platform == "linux" or platform == "linux2":
            candidates = glob.glob(os.path.join(cwd, file_name) + '.x86_64')
            if len(candidates) == 0:
                candidates = glob.glob(os.path.join(cwd, file_name) + '.x86')
            if len(candidates) == 0:
                candidates = glob.glob(file_name + '.x86_64')
            if len(candidates) == 0:
                candidates = glob.glob(file_name + '.x86')
            if len(candidates) > 0:
                launch_string = candidates[0]

My issue is resolved, but I think this issue should remain open until the environment file is fixed.

@awjuliani

This comment has been minimized.

Copy link
Collaborator

awjuliani commented Jan 29, 2019

Hi @seungjaeryanlee,

I am sorry this didn't work for you out of the box. This is a bug in our automated build script, and we will be fixing it and uploading new builds tomorrow.

@awjuliani awjuliani added the bug label Jan 29, 2019

@harperj

This comment has been minimized.

Copy link
Collaborator

harperj commented Jan 29, 2019

I've updated the build to include the proper extension -- thanks for reporting this issue @seungjaeryanlee! I'll close this issue now but feel free to reopen if needed.

@harperj harperj closed this Jan 29, 2019

@seungjaeryanlee

This comment has been minimized.

Copy link
Author

seungjaeryanlee commented Jan 30, 2019

It works perfectly now! Thank you @awjuliani and @harperj

@alejgomez

This comment has been minimized.

Copy link

alejgomez commented Feb 17, 2019

Hello, I've encountered this same issue in the latest build. I'm using MacOS and my /ObstacleTower/ folder is under the same directory as my demo.py. I've played around with the obstacletower name (obstacletower.app) or changing the directories where the file is unzipped but nothing seems to work.
I run exactly the same 6 steps in this original post, yet I get the same error when running:

env = ObstacleTowerEnv('./ObstacleTower/obstacletower⁩', retro=False)
The following error appears.

Alejandros-MBP:Trial Agents alejandrogomez$ python3 demo.py
Traceback (most recent call last):
  File "demo.py", line 4, in <module>
    env = ObstacleTowerEnv('./ObstacleTower/obstacletower⁩.app', retro=False)
  File "/Users/alejandrogomez/Development/AI/Libraries/obstacle-tower-env/obstacle_tower_env.py", line 45, in __init__
    timeout_wait=timeout_wait)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mlagents_envs/environment.py", line 60, in __init__
    self.executable_launcher(file_name, docker_training, no_graphics)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/mlagents_envs/environment.py", line 174, in executable_launcher
    .format(true_filename))
mlagents_envs.exception.UnityEnvironmentException: Couldn't launch the obstacletower⁩ environment. Provided filename does not match any environments.

Any help would be appreciated! Thanks

@pringshia

This comment has been minimized.

Copy link

pringshia commented Feb 17, 2019

Also having the same issue as @alejgomez on MacOSX

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment