ml-agents icon indicating copy to clipboard operation
ml-agents copied to clipboard

UnityEnvironmentException: Couldn't launch the 3DBall environment. Provided filename does not match any environments.

Open shengtianzhu opened this issue 8 years ago • 17 comments

Hi I tried the 3DBall Tutorial. But when I try to load the environment I get the error:

image

I use Unity to Build the exe file named"3DBall".And Copy this flie to python folder.But it's show error. on the Tutorial step: image I think the "environment" is "3DBall.exe" flie and "3DBall_Data" folder. Copy this two flie to python folder. What is error on my step?

shengtianzhu avatar Dec 22 '17 10:12 shengtianzhu

I am using Windows 10. other environment like the Tutorial say

shengtianzhu avatar Dec 22 '17 10:12 shengtianzhu

Hello, I tried only on MAC. On it i have to save build in unity-environment folder, and next in the Jupyter notebook change env_name = "name_of_the_file" in Basics.ipynb.

zrzut ekranu 2017-12-22 11 33 14

ghost avatar Dec 22 '17 10:12 ghost

Hi @Izhmael
Thanks! I try on your step. But still error image I don't think I know how to use the jupyter. I'll learn how to use the jupyter, first

shengtianzhu avatar Dec 23 '17 03:12 shengtianzhu

Hi @shengtianzhu,

It seems that you are running one ipython notebook from another. Is there a reason for this?

awjuliani avatar Dec 23 '17 18:12 awjuliani

you have to put your build name 3DBall.exe in python directory. (my env_name = "build" because my game is named build.exe) :

image

Fangh avatar Dec 24 '17 11:12 Fangh

Hi @Fangh this is my python directory screenshot image and my Basics.ipynb screenshot is image

shengtianzhu avatar Dec 25 '17 02:12 shengtianzhu

Hi @awjuliani I run this ipython notebook like this.In Jupyter Home view. Click the Python3 button jump to the Untitled1 page. In the Untitled1 page, I run this command “%run C:/Users/Sheng/Downloads/ml-agents-master/python/Basics.ipynb”。The python directory screenshot and Basics.ipynb screenshot in the above reply All the steps are shown in the screenshot image

image

shengtianzhu avatar Dec 25 '17 02:12 shengtianzhu

Hi @shengtianzhu,

I believe the issue is that you need to launch jupyter notebook itself from your ml-agents/python directory. It seems that it is being launched from another directory, whichever one contains the two Untitled notebooks.

awjuliani avatar Dec 26 '17 16:12 awjuliani

Had some trouble with this in OSX Sierra. Fix for me was:

  • as awjuliani says, run notebook from ml-agents/python dir
  • put your Foo.app unity build in that same ml-agents/python dir
  • now if you run e.g. Basics in notebook then set env_name = "Foo"

jglazman avatar Dec 27 '17 08:12 jglazman


i have the same problem and tried as @jglazman said, but that didn't help( I am using Unity 2017.3.0f3 Personal and macOS High Sierra 10.13.2 I Installed tensorflow cpu through anaconda. Terminal: screen shot 2018-01-06 at 23 43 25 Folder ml-agents/python: screen shot 2018-01-06 at 23 42 01 Jupyter: screen shot 2018-01-06 at 23 41 39

tananuka avatar Jan 06 '18 20:01 tananuka

@tananuka it looks like your app file is named Foo, but it should be named Foo.app

ml-agents/python/Foo.app

jeremyPLR avatar Jan 07 '18 08:01 jeremyPLR

@jeremyPLR It named, just filename extension hided screen shot 2018-01-07 at 13 22 56

tananuka avatar Jan 07 '18 10:01 tananuka

Thanks to @wouterhardeman. When i opened the application (Foo.app) by right-clicking and selecting 'Show Package Contents' and then go to 'Contents/MacOS', the file is called 'test2'. I renamed it from "Foo" to "test2" and env_name="test2". That helped because it is first name of build. 'Ball3DAcademy' started successfully! All glory to @wouterhardeman 👍

tananuka avatar Jan 07 '18 16:01 tananuka

Glad you were able to figure out the problem @tananuka! OSX is somewhat tricky in that changing the name of the .app does not change the name of the actual binary file itself. Our UnityEnv code currently assumes that the name of the .app and the name of the binary are the same. Now that I think about it though, this doesn't necessarily need to be the case... I will add to our to-do list making this more flexible.

awjuliani avatar Jan 07 '18 18:01 awjuliani

Thanks to @wouterhardeman, the renaming .app issue has been fixed! https://github.com/Unity-Technologies/ml-agents/commit/a2f8ef564471cef99fde5b594daf1368a50d9b95

awjuliani avatar Jan 08 '18 01:01 awjuliani

In windows 10 you give your application.exe path

image

For example "E:\ml-agents-master\envs\MLFirst\Sample Project"

mustfkeskin avatar Nov 15 '18 06:11 mustfkeskin

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.

lock[bot] avatar Jan 03 '20 00:01 lock[bot]