It is currently Tue Jan 23, 2018 8:14 am Advanced search

Error testing locally

Topics about starter packages, visualizer or any other third party tools.
Please submit new language requests in the Language Request Forum.

Error testing locally

Postby shaomonksn » Sat Dec 10, 2011 10:00 pm

I wanted to test the C starter package locally so I made that tutorial script and made changes so it uses my compiled exe file. However, my bot crashes in turn 0 and gives following error message:

turn 0 bot 0 crashed
File "mravi.exe", line 1
SyntaxError: Non-ASCII character '\x90' in file mravi.exe on line 1, but no encoding declared;

I'm at the end of my wits trying to figure out how to fix this. I have a vague understanding of what might be the cause of this error but I don't even know how to begin solving the issue. Thx for your help in advance.
shaomonksn
Cadet
 
Posts: 3
Joined: Sat Dec 10, 2011 9:53 pm

Re: Error testing locally

Postby Scryer » Sat Dec 10, 2011 10:14 pm

Looks to me like you changed the submission script incorrectly. I suspect you're trying to call your program as a Python program, and since it's an executable it doesn't believe you. You probably want to leave it as-is and give your .exe file as an argument to the script -- I'm using the linux version, but I assume the Windows one is similar.
Scryer
Colonel
 
Posts: 72
Joined: Wed Nov 09, 2011 5:40 pm

Re: Error testing locally

Postby shaomonksn » Sat Dec 10, 2011 10:52 pm

I have tried to run it with this script:

python tools/playgame.py "python Mravi/bin/Debug/mravi.exe" "python tools/sample_bots/python/HunterBot.py" --map_file tools/maps/example/tutorial1.map --log_dir game_logs --turns 60 --scenario --food none --player_seed 7 --verbose -e
shaomonksn
Cadet
 
Posts: 3
Joined: Sat Dec 10, 2011 9:53 pm

Re: Error testing locally

Postby PeterB » Sun Dec 11, 2011 12:05 am

Remove the python when starting the exe, it doesn't have to run through a python interpreter.

e.g.
python tools/playgame.py "Mravi/bin/Debug/mravi.exe" "python tools/sample_bots/python/HunterBot.py" --map_file tools/maps/example/tutorial1.map --log_dir game_logs --turns 60 --scenario --food none --player_seed 7 --verbose -e
PeterB
Cadet
 
Posts: 4
Joined: Tue Nov 15, 2011 1:27 pm

Re: Error testing locally

Postby shaomonksn » Sun Dec 11, 2011 1:19 am

Thanks a bunch. That did the trick!
shaomonksn
Cadet
 
Posts: 3
Joined: Sat Dec 10, 2011 9:53 pm


Return to Starter Packages & Tools

Who is online

Users browsing this forum: No registered users and 1 guest

cron