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

UnityTimeOutException #44

Closed
iandanforth opened this issue Feb 11, 2019 · 6 comments
Closed

UnityTimeOutException #44

iandanforth opened this issue Feb 11, 2019 · 6 comments

Comments

@iandanforth
Copy link

iandanforth commented Feb 11, 2019

System: Windows 10
Python: 3.6.5
ObstacleTower: v1.1

When I run env = ObstacleTowerEnv('./ObstacleTower/obstacletower', retro=False) after installing the requirements I see the following:

The unity splash-screen is displayed, then a tan background appears with the main character briefly in view. She then falls off the screen leaving only the tan background.

Traceback:

---------------------------------------------------------------------------
UnityTimeOutException                     Traceback (most recent call last)
<ipython-input-4-5604368d73f6> in <module>()
----> 1 env = ObstacleTowerEnv('./ObstacleTower/obstacletower', retro=False)

~\AppData\Roaming\Python\Python36\site-packages\obstacle_tower_env.py in __init__(self, environment_filename, docker_training, worker_id, retro)
     37             docker_training = True
     38 
---> 39         self._env = UnityEnvironment(environment_filename, worker_id, docker_training=docker_training)
     40 
     41         split_name = self._env.academy_name.split('-v')

~\AppData\Roaming\Python\Python36\site-packages\mlagents_envs\environment.py in __init__(self, file_name, worker_id, base_port, seed, docker_training, no_graphics)
     65         )
     66         try:
---> 67             aca_params = self.send_academy_parameters(rl_init_parameters_in)
     68         except UnityTimeOutException:
     69             self._close()

~\AppData\Roaming\Python\Python36\site-packages\mlagents_envs\environment.py in send_academy_parameters(self, init_parameters)
    491         inputs = UnityInput()
    492         inputs.rl_initialization_input.CopyFrom(init_parameters)
--> 493         return self.communicator.initialize(inputs).rl_initialization_output
    494 
    495     def wrap_unity_input(self, rl_input: UnityRLInput) -> UnityOutput:

~\AppData\Roaming\Python\Python36\site-packages\mlagents_envs\rpc_communicator.py in initialize(self, inputs)
     77         if not self.unity_to_external.parent_conn.poll(30):
     78             raise UnityTimeOutException(
---> 79                 "The Unity environment took too long to respond. Make sure that :\n"
     80                 "\t The environment does not need user interaction to launch\n"
     81                 "\t The Academy and the External Brain(s) are attached to objects in the Scene\n"

UnityTimeOutException: The Unity environment took too long to respond. Make sure that :
	 The environment does not need user interaction to launch
	 The Academy and the External Brain(s) are attached to objects in the Scene
	 The environment and the Python interface have compatible versions.

Image:

image

@iandanforth
Copy link
Author

Neeever mind. This is what happens when you try to run v1.1 of the exe with an old version of the env. Everybody else, don't do that.

@stalkermustang
Copy link

stalkermustang commented Feb 11, 2019

Have same issue on Win10. What solution you find?
I download v1.0(!) zip with exe-file, install v1.1 libary(and examples), and then this working(with change only dirname with executable file).
With v1.1 win zip (i checked md5 sum, all correct) i have trouble :/

AND funny moment: my computer shutdown ( D: ) after i manually run .exe file w/o python wrappers. It's a joke, or why we have file named UnityCrashHandler32 xD ?) @awjuliani

UPD: shutdown only on 1.1 version, 1.0 is working, i can play and pass the levels.

@iandanforth
Copy link
Author

@stalkermustang Hey I had to re-install this repository. So if you have a local clone

git pull
pip install -e .

@stalkermustang
Copy link

stalkermustang commented Feb 11, 2019

Do you download v1.1 executable game file? Can you play it?

@aole
Copy link

aole commented Feb 12, 2019

Can't get it to work, Did you do anything else? I am able to play the game and the repository is also uptodate. @awjuliani

@iandanforth
Copy link
Author

Sorry all that's all I had to make it work. I am able to launch v1.1 by double clicking the exe. The first time I did this I got a Windows prompt that this was unverified code and I had to click through that warning.

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

3 participants