PowerShell Error

I’m really trying to learn how to do this. Telling me to run scripts\run_match.ps1 in PowerShell isn’t enough.
I unrestricted PowerShell. The reply file says crashed and is 2 moves long.

Windows PowerShell
Copyright © 2009 Microsoft Corporation. All rights reserved.

PS C:\Windows\system32> cd
PS C:\Windows\system32> cd C:\Users\Kevin\Desktop\C1GamesStarterKit
PS C:\Users\Kevin\Desktop\C1GamesStarterKit> scripts\run_match.ps1
p1:
C:\Users\Kevin\Desktop\C1GamesStarterKit\algos\starter-algo\run.ps1
p2:
C:\Users\Kevin\Desktop\C1GamesStarterKit\algos\starter-algo\run.ps1
Starting Engine
Starting single worker game.
C:\Users\Kevin\Desktop\C1GamesStarterKit\algos\starter-algo\run.ps1
C:\Users\Kevin\Desktop\C1GamesStarterKit\algos\starter-algo\run.ps1
Saving replay: C:\Users\Kevin\Desktop\C1GamesStarterKit\replays\p1-03-10-2018-16-37-10-1538599030609–1960046505.replay
P1 Name: starter-algo
P2 Name: starter-algo
Starting turn: 0
SAPlayer 1 starter-algo: Split-Path : Cannot bind argument to parameter ‘Path’ because it is null.
SAPlayer 1 starter-algo: At C:\Users\Kevin\Desktop\C1GamesStarterKit\algos\starter-algo\run.ps1:1 char:2
SAPlayer 1 starter-algo: 5
SAPlayer 1 starter-algo: + $scriptPath = Split-Path <<<< -parent $PSCommandPath;
SAPlayer 1 starter-algo: + CategoryInfo : InvalidData: (:slight_smile: [Split-Path], ParameterBindingV
SAPlayer 1 starter-algo: alidationException
SAPlayer 1 starter-algo: + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,M
SAPlayer 1 starter-algo: icrosoft.PowerShell.Commands.SplitPathCommand
SAPlayer 1 starter-algo:
SAPlayer 1 starter-algo: (null): can’t open file ‘\algo_strategy.py’: [Errno 2] No such file or directory
SAPlayer 2 starter-algo: Split-Path : Cannot bind argument to parameter ‘Path’ because it is null.
SAPlayer 2 starter-algo: At C:\Users\Kevin\Desktop\C1GamesStarterKit\algos\starter-algo\run.ps1:1 char:2
SAPlayer 2 starter-algo: 5
SAPlayer 2 starter-algo: + $scriptPath = Split-Path <<<< -parent $PSCommandPath;
SAPlayer 2 starter-algo: + CategoryInfo : InvalidData: (:slight_smile: [Split-Path], ParameterBindingV
SAPlayer 2 starter-algo: alidationException
SAPlayer 2 starter-algo: + FullyQualifiedErrorId : ParameterArgumentValidationErrorNullNotAllowed,M
SAPlayer 2 starter-algo: icrosoft.PowerShell.Commands.SplitPathCommand
SAPlayer 2 starter-algo:
SAPlayer 2 starter-algo: (null): can’t open file ‘\algo_strategy.py’: [Errno 2] No such file or directory
timed out
Last state:
{“p2Units”:[[],[],[],[],[],[],[]],“turnInfo”:[0,0,-1],“p1Stats”:[30.0,25.0,5.0,0],“p1Units”:[[],[],[],[],[],[],[]],“p2St
ats”:[30.0,25.0,5.0,0],“events”:{“selfDestruct”:[],“breach”:[],“damage”:[],“shield”:[],“move”:[],“spawn”:[],“death”:[],"
attack":[],“melee”:[]}}

timed out
Last state:
{“p2Units”:[[],[],[],[],[],[],[]],“turnInfo”:[0,0,-1],“p1Stats”:[30.0,25.0,5.0,0],“p1Units”:[[],[],[],[],[],[],[]],“p2St
ats”:[30.0,25.0,5.0,0],“events”:{“selfDestruct”:[],“breach”:[],“damage”:[],“shield”:[],“move”:[],“spawn”:[],“death”:[],"
attack":[],“melee”:[]}}

Player0 punished because took too long. Time (ms): 50013 Dmg: 30
Player1 punished because took too long. Time (ms): 50001 Dmg: 30
Winner (p1 perspective, 1 = p1 2 = p2): 2
PLAYER 2 WINS!
Waiting to exit finished game.
sent game end playerIndex: 0
sent game end playerIndex: 1
sent game end playerIndex: 0
sent game end playerIndex: 1
Done waiting now exiting finished game.
Hard Exiting Now
Closing stream

2 Likes

I installed java jdk 10 and python3. And i can ensure you \algo_strategy.py does exist. Also im using windows 7.

1 Like

Thank you for the detailed error report, sorry if this is frustrating you looks like you did all the steps correctly.

What version of powershell are you using? It may be that since you are on windows 7 it comes installed with an old version of powershell and so some of the commands in our powershell scripts aren’t available. You can check with the following command:
$PSVersionTable.PSVersion

We’ve mostly tested on powershell version 5 so far so sorry for missing this dependency if its indeed the issue.

1 Like

If the powershell version is less than 5 try upgrading using the following link:

https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-windows-powershell?view=powershell-6

1 Like

Thank you so much for your quick feedback.

Turns out I had PowerShell version 1.0. But i couldn’t figure out how to install a newer version.
So i just tried on Ubuntu and it worked just fine.

1 Like

This link should work with windows 7 I got it from the table in the link before.
https://www.microsoft.com/en-us/download/details.aspx?id=54616

Glad it works well on ubuntu though!

1 Like

That worked thank you. Should i leave the post up? I will edit out the exiting part.

1 Like

Ya just leave it up in case other people have similar issues.

1 Like