I’m stuck on Stage IP1 using Python. When running commands from Path directories. my_exe may not be present on the cloud when using git and codecrafters.
I’ve viewed example codes but all of them did the same as I did.
Here are my logs:
remote: [tester::#IP1] > my_exe James
remote: [your-program] my_exe: command not found
remote: [your-program] $
remote: [tester::#IP1] Expected output to match "^Hello James! The secret code is 307778.\n", got "my_exe: command not found\r\n$ "
remote: [tester::#IP1] condition not met
And here’s a snippet of my code:
try:
subprocess.run(statement)
except FileNotFoundError as err:
print(command + ": command not found")
Both codecrafters and git push run tests remotely using the exact same infrastructure, that’s surprising. Can you confirm that you’re seeing failures when using Git push but the same works when using the codecrafters CLI? Or does this happen in both cases?
Hard to tell what’s going on without more info. We run the tester against bash in CI + multiple people have passed the stage so I don’t think it’s a case where my_exe isn’t present.
Thanks, man for quick replies. I have got it fixed.
I just forgot that subprocess.run() takes string array of arguments so I needed to split. It worked fine on Windows but not on Linux.