Andreas Nord
06/27/2022, 3:37 PM[2022-06-27 17:16:15+0200] ERROR - prefect.DbtShellTask | /bin/bash: C:UsersUSERAD~1AppDataLocalTempprefect-6rbqzzlx: No such file or directory
This line in prefect.tasks.shell.py generates a strange path:
with tempfile.NamedTemporaryFile(prefix="prefect-") as tmp:
from prefect import Flow
from prefect.tasks.shell import ShellTask
task = ShellTask(log_stderr=True)
with Flow("My Flow") as f:
# both tasks will be executed in home directory
contents = task(command='ls')
out = f.run()
gives the same error:
[2022-06-28 09:55:31+0200] INFO - prefect.FlowRunner | Beginning Flow run for 'My Flow'
[2022-06-28 09:55:31+0200] INFO - prefect.TaskRunner | Task 'ShellTask': Starting task run...
[2022-06-28 09:55:31+0200] ERROR - prefect.ShellTask | Command failed with exit code 127
[2022-06-28 09:55:31+0200] ERROR - prefect.ShellTask | /bin/bash: C:UsersUSERAD~1AppDataLocalTempprefect-_exffnpu: No such file or directory
Kevin Kho
06/28/2022, 8:00 AMAndreas Nord
06/28/2022, 8:02 AMKevin Kho
06/28/2022, 8:02 AMos.subprocess
call inside a taskAndreas Nord
06/28/2022, 8:07 AM