Ml-agents: Unity was unable to read the arguments passed at launch.

Created on 5 Jan 2018  路  10Comments  路  Source: Unity-Technologies/ml-agents

Please Help.
I am using Unity 2017.3.0f3 Personal and macOS High Sierra 10.13.2
I installed Python 2.7 from package ver. 9.0.1, that downloaded from official site
Then i performed in terminal: pip install tensorflow
that's all what i installed, maybe i missed something?
Because when i am trying to launch Balance Ball Example i get exception:
UnityAgentsException: The brain Ball3DBrain was set to External mode but Unity was unable to read the arguments passed at launch. CoreBrainExternal.InitializeCoreBrain () (at Assets/ML-Agents/Scripts/CoreBrainExternal.cs:27) Brain.InitializeBrain () (at Assets/ML-Agents/Scripts/Brain.cs:187) Academy.Awake () (at Assets/ML-Agents/Scripts/Academy.cs:124)

Most helpful comment

dear @wouterhardeman
When i opened 'Contents/MacOS' the file called "test2" and i renamed it to "test2". That helped because it is first name of build. 'Ball3DAcademy' started successfully!
Thanks a lot!

All 10 comments

That error means the brain was set to external mode, and the game wasn't able to connect to the Anaconda/PPO for some reason when it launched. If you want to test an environment without hooking up to the python side, you can't have brain set to external, that is only for when the PPO stuff drives the agents, I test things to make sure it launches and doesn't have errors with the brain set to player.

Also, I think you need to install more than just python, you need anaconda, tensorflow (gpu or cpu) setup through anaconda, then you can launch the jupyter notebook stuff and all that.

thanks @MDReptile ,
i installed anaconda from official site and setup tensorflow using this guide,
but i found out a new problem)

You need to edit the PPO when you open it in your browser, where it has "env_name" you put the name of your built exe. Like "MyTestBuild.Exe" would be "MyTestBuild" (without .exe)

You get the unable to read the arguments passed at launch error if you try to play the scene inside of the Unity editor with your brain type set to external. These are the steps that I follow:

  1. Open the scene in the Unity editor and set the brain type to external.
  2. Save and build the scene (e.g. 3dball.app).
  3. Train your brain from python on your command line (or jupyter notebook).
  4. Follow the instructions to embed the trained model into Unity.
  5. Now, back in Unity, set the brain type to internal and set the graph model to the bytes file you exported from python.
  6. Play the scene in Unity and you should be able to observe the results of your training.

@MDReptile @jeremyPLR
i did as like you had said, but i still have that problem with filename: Provided filename does not match any environments

@tananuka Have you placed the executable (like 'Game.exe') in the root of the 'python' folder?

@wouterhardeman yes, i did

@tananuka I just saw your comment on the other issue and I think I found the problem. When you open the application (Foo.app) by right-clicking and selecting 'Show Package Contents' and then go to 'Contents/MacOS', is the file called 'Foo' or 'foo'? This could be the problem, since UNIX systems (like MacOS) are case-sensitive.

You could try to rename to file to 'foo' and change the 'env_name' in the settings to 'foo' aswell.

dear @wouterhardeman
When i opened 'Contents/MacOS' the file called "test2" and i renamed it to "test2". That helped because it is first name of build. 'Ball3DAcademy' started successfully!
Thanks a lot!

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jlanis picture jlanis  路  4Comments

MrGitGo picture MrGitGo  路  4Comments

green4you picture green4you  路  4Comments

Procuste34 picture Procuste34  路  3Comments

GuntherFox picture GuntherFox  路  3Comments