Error in executing the reference bots

I’m trying to run the c# reference bots, and I’m getting cannot find the file error shown below:

05-05-2017 23:09:24:749 - I:    Executing process D:\projects\challenge\2017-Bat
tleships\GameEngine\Battleships\Battleships\bin\Debug\Calibrations\BotCalibratio
nDotNet.exe A "D:\projects\challenge\2017-Battleships\GameEngine\Battleships\Bat
tleships\bin\Debug\Replays\2017-05-05 23-09-24-185\Phase 1 - Round 0\A"
05-05-2017 23:09:24:752 - E:    Failed to run calibration test System.ComponentM
odel.Win32Exception (0x80004005): The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startIn
fo)
   at System.Diagnostics.Process.Start()
   at BotRunner.Util.ProcessHandler.StartProcessCommon() in D:\projects\challeng
e\2017-Battleships\GameEngine\Battleships\BotRunner\Util\ProcessHandler.cs:line
76
   at BotRunner.Util.ProcessHandler.RunProcess() in D:\projects\challenge\2017-B
attleships\GameEngine\Battleships\BotRunner\Util\ProcessHandler.cs:line 68
   at TestHarness.TestHarnesses.Bot.Runners.DotNetRunner.RunCalibrationTest() in
 D:\projects\challenge\2017-Battleships\GameEngine\Battleships\BotRunner\Harness
\Bot\Runners\DotNetRunner.cs:line 39
   at TestHarness.TestHarnesses.Bot.BotRunner.CalibrateBot() in D:\projects\chal
lenge\2017-Battleships\GameEngine\Battleships\BotRunner\Harness\Bot\BotRunner.cs
:line 40
05-05-2017 23:09:24:753 - I:    Bot calibration complete and can run an addition
al 5ms due to environment startup
05-05-2017 23:09:24:756 - D:    Executing bot with following commands D:\project
s\challenge\2017-Battleships\Reference Bots\C#\ReferenceBot\bin\Debug\bin\Debug\
ReferenceBot.exe A "D:\projects\challenge\2017-Battleships\GameEngine\Battleship
s\Battleships\bin\Debug\Replays\2017-05-05 23-09-24-185\Phase 1 - Round 0\A"
05-05-2017 23:09:24:756 - I:    Executing process D:\projects\challenge\2017-Bat
tleships\Reference Bots\C#\ReferenceBot\bin\Debug\bin\Debug\ReferenceBot.exe A "
D:\projects\challenge\2017-Battleships\GameEngine\Battleships\Battleships\bin\De
bug\Replays\2017-05-05 23-09-24-185\Phase 1 - Round 0\A"
05-05-2017 23:09:24:757 - E:    Failure while executing bot D:\projects\challeng
e\2017-Battleships\Reference Bots\C#\ReferenceBot\bin\Debug\bin\Debug\ReferenceB
ot.exe A "D:\projects\challenge\2017-Battleships\GameEngine\Battleships\Battlesh
ips\bin\Debug\Replays\2017-05-05 23-09-24-185\Phase 1 - Round 0\A"System.Compone
ntModel.Win32Exception (0x80004005): The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startIn
fo)
   at System.Diagnostics.Process.Start()
   at BotRunner.Util.ProcessHandler.StartProcessCommon() in D:\projects\challeng
e\2017-Battleships\GameEngine\Battleships\BotRunner\Util\ProcessHandler.cs:line
76
   at BotRunner.Util.ProcessHandler.RunProcess() in D:\projects\challenge\2017-B
attleships\GameEngine\Battleships\BotRunner\Util\ProcessHandler.cs:line 68
   at TestHarness.TestHarnesses.Bot.BotRunner.RunBot() in D:\projects\challenge\
2017-Battleships\GameEngine\Battleships\BotRunner\Harness\Bot\BotRunner.cs:line
76

Bot John encountered an error, press any key to continue

You need to change the “RunFile” property in your Bot.JSON file to point to your bot. The default Bot.JSON the address is incorrect.
Simplest is to just change from:
“RunFile” : “bin\Debug\ReferenceBot.exe”
to
“RunFile” : “ReferenceBot.exe”

1 Like

thanks @BoerBedonnered. that worked.

I see another option was just to specify the root folder of the reference bot so that the engine read the bot.json over there.

May you have fair winds and following seas ahead! :smile: