testmycode/tmc-cli

Failed to run test

kragil opened this issue · 1 comments

Hello I installed everything for my cybersecurity course and the sanity.py says it is GOOD SO FAR,

but when I try to test my portscanner code I get:

Testing: part1-01.portscanner
Failed to run test

Here are my logs:
2023-02-09 14:59:16 INFO EventStore:36 - Loaded {0} events
2023-02-09 14:59:16 INFO EventStore:36 - Loaded {0} events
2023-02-09 14:59:16 INFO EventStore:27 - Saved {0} events
2023-02-09 14:59:16 INFO EventStore:27 - Saved {0} events
2023-02-09 14:59:16 INFO TmcCore:131 - Creating new RunTests command
2023-02-09 14:59:16 INFO TmcCore:131 - Creating new RunTests command
2023-02-09 14:59:16 INFO RunTests:32 - Running tests for exercise part1-01.portscanner
2023-02-09 14:59:16 INFO RunTests:32 - Running tests for exercise part1-01.portscanner
2023-02-09 14:59:16 DEBUG RunTests:36 - Determined project path as c:\Users\m\3D Objects\Python\mooc-securing-software-23\part1-01.portscanner
2023-02-09 14:59:16 DEBUG RunTests:36 - Determined project path as c:\Users\m\3D Objects\Python\mooc-securing-software-23\part1-01.portscanner
2023-02-09 14:59:16 DEBUG RunTests:39 - Calling TMC Langs
2023-02-09 14:59:16 DEBUG RunTests:39 - Calling TMC Langs
2023-02-09 14:59:16 INFO ProjectType:54 - Finding plugin for c:\Users\m\3D Objects\Python\mooc-securing-software-23\part1-01.portscanner
2023-02-09 14:59:16 INFO ProjectType:58 - Detected project as python3
2023-02-09 14:59:16 ERROR Python3Plugin:110 - Failed to run tests.
java.io.IOException: Cannot run program "py" (in directory "c:\Users\m\3D Objects\Python\mooc-securing-software-23\part1-01.portscanner"): CreateProcess error=2, Das System kann die angegebene Datei nicht finden
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
at fi.helsinki.cs.tmc.langs.utils.ProcessRunner.call(ProcessRunner.java:36)
at fi.helsinki.cs.tmc.langs.python3.Python3Plugin.runTests(Python3Plugin.java:108)
at fi.helsinki.cs.tmc.langs.util.TaskExecutorImpl.runTests(TaskExecutorImpl.java:39)
at fi.helsinki.cs.tmc.core.commands.RunTests.call(RunTests.java:40)
at fi.helsinki.cs.tmc.core.commands.RunTests.call(RunTests.java:19)
at fi.helsinki.cs.tmc.core.utilities.ExceptionTrackingCallable.call(ExceptionTrackingCallable.java:39)
at fi.helsinki.cs.tmc.cli.backend.TmcUtil.runLocalTests(TmcUtil.java:184)
at fi.helsinki.cs.tmc.cli.command.RunTestsCommand.run(RunTestsCommand.java:76)
at fi.helsinki.cs.tmc.cli.core.AbstractCommand.execute(AbstractCommand.java:63)
at fi.helsinki.cs.tmc.cli.Application.runCommand(Application.java:108)
at fi.helsinki.cs.tmc.cli.Application.run(Application.java:217)
at fi.helsinki.cs.tmc.cli.Application.main(Application.java:231)
Caused by: java.io.IOException: CreateProcess error=2, Das System kann die angegebene Datei nicht finden
at java.base/java.lang.ProcessImpl.create(Native Method)
at java.base/java.lang.ProcessImpl.(ProcessImpl.java:492)
at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:153)
at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
... 13 more
2023-02-09 14:59:16 ERROR Python3Plugin:116 - Failed to read test results.

How do I get this py command? Alias python?

Submitting works btw.

Problem was the Python Version from the MS Store. It has no Py. Installing Python from the website fixed it.