Hi! I am wondering if anyone is able to use ShellTask on Windows?
I'm running a script from tutorial and getting an error:
from prefect import Flow
from prefect.tasks.shell import ShellTask
task = ShellTask(helper_script="cd ~")
with Flow("My Flow") as f:
contents = task(command='ls')
out = f.run()
[2021-02-26 10:32:28+1100] INFO - prefect.FlowRunner | Beginning Flow run for 'My Flow'
[2021-02-26 10:32:28+1100] INFO - prefect.TaskRunner | Task 'ShellTask': Starting task run...
[2021-02-26 10:32:28+1100] ERROR - prefect.TaskRunner | Unexpected error: FileNotFoundError(2, 'The system cannot find the file specified', None, 2, None)
Traceback (most recent call last):
.....
....
python\python38-32\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified
I do have bash installed, also specifying path doesn't help
task = ShellTask(shell="C:\Windows\System32\bash.exe", helper_script="cd ~")