question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

UnityTimeOutException

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

2reactions
aolecommented, 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

1reaction
stalkermustangcommented, 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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Unity environment took too long to respond. · Issue # ...
mlagents_envs.exception.UnityTimeOutException: The Unity environment took too long to respond. Make sure that :
Read more >
Resolved - UnityTimeOutException
Hi, I have been having issues connecting mlagents-learn/mlagents_env with my project. I get the error: File...
Read more >
ml-agents-envs/mlagents_envs/environment.py · 旋律悠扬/ ...
UnityTimeOutException,. UnityCommunicatorStoppedException,. ) from mlagents_envs.communicator_objects.command_pb2 import STEP, RESET.
Read more >
unixpickle | Participants
UnityTimeOutException in evaluation. Over 3 years ago. Spoke too soon. Just did another submission and got another timeout after 998s seconds (my timeout ......
Read more >
Mlagents-learn train: "The Unity environment took too long ...
There are many variables that could cause this. Verify the version of your python and mlagents are the same. Verify too that you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found