Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

I can't solve the error when I play 3DBall for the first time

Discussion in 'ML-Agents' started by shundai_yamamoto, May 29, 2020.

  1. shundai_yamamoto


    May 29, 2020
    I'm bigginner of unity and ML-agents. I took first learning of 3DBall, but I got some errors.
    Please tell me why the errors happened and the solutions.

    My Environment:
    Unity : 2018.4.17f1
    MLagents: release_1
    python : 3.7.6
    conda : 4.8.3

    I try this command:
    mlagents-learn ./config/trainer_config.yaml --run-id=firstRun
    I got this error:

    Version information:
    ml-agents: 0.16.0,
    ml-agents-envs: 0.16.0,
    Communicator API: 1.0.0,
    TensorFlow: 2.2.0
    2020-05-29 17:04:17.573405: W tensorflow/stream_executor/platform/default/] Could not load dynamic library 'cudart64_101.dll'; dlerror: cudart64_101.dll not found
    2020-05-29 17:04:17.581637: I tensorflow/stream_executor/cuda/] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
    WARNING:tensorflow:From c:\anaconda\envs\ml-agents\lib\site-packages\tensorflow\python\compat\ disable_resource_variables (from tensorflow.python.ops.variable_scope) is deprecated and will be removed in a future version.
    Instructions for updating:
    non-resource variables are not supported in the long term
    2020-05-29 17:04:20 INFO [] Listening on port 5004. Start training by pressing the Play button in the Unity Editor.
    2020-05-29 17:05:20 INFO [] UnityEnvironment worker 0: environment stopping.
    2020-05-29 17:05:20 WARNING [] Unable to save to ./summaries/firstRun_timers.json. Make sure the directory exists
    Traceback (most recent call last):
    File "c:\anaconda\envs\ml-agents\lib\", line 193, in _run_module_as_main
    "__main__", mod_spec)
    File "c:\anaconda\envs\ml-agents\lib\", line 85, in _run_code
    exec(code, run_globals)
    File "C:\anaconda\envs\ml-agents\Scripts\mlagents-learn.exe\", line 7, in <module>
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents\trainers\", line 554, in main
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents\trainers\", line 550, in run_cli
    run_training(run_seed, options)
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents\trainers\", line 407, in run_training
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents_envs\", line 305, in wrapped
    return func(*args, **kwargs)
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents\trainers\", line 223, in start_learning
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents_envs\", line 305, in wrapped
    return func(*args, **kwargs)
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents\trainers\", line 154, in _reset_env
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents\trainers\", line 67, in reset
    self.first_step_infos = self._reset_env(config)
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents\trainers\", line 295, in _reset_env
    ew.previous_step = EnvironmentStep(ew.recv().payload, ew.worker_id, {}, {})
    File "c:\anaconda\envs\ml-agents\lib\site-packages\mlagents\trainers\", line 92, in recv
    raise env_exception
    mlagents_envs.exception.UnityTimeOutException: The Unity environment took too long to respond. Make sure that :
    The environment does not need user interaction to launch
    The Agents are linked to the appropriate Brains
    The environment and the Python interface have compatible versions.

    I can't understand this error.
    Please give me solution.
  2. MrWetsnow


    Jan 5, 2020
    1. mkdir summaries (for the first error)

    2. Just to confirm, after you ran this command, did you press 'play' in Unity?
  3. shundai_yamamoto


    May 29, 2020
    thank you for replying.
    I pressed 'play' in Unity after I ran this command.
    I think the 3DBall worked with predicted model.
    Did the second error of 'The Agents are linked to the appropriate Brains' occur because of that reasen 'the 3DBall worked with predicted model' ?