Carlos Cueto
02/17/2023, 4:44 PMshell_run_command
from prefect-shell
into the new ShellOperation
class, however, I'm always running into the following error when I try to run ANY command. This is using WINDOWS. Examples:
ShellOperation(commands=["echo Hello"]).run()
Mansour Zayer
02/17/2023, 5:31 PMsubprocess
module, especially if you're on windows. You can run a shell task like
import subprocess
subprocess.run(command, stdout=True, check=True)
Under the hood, the shell_run_command and shellOperation also use this module, but I think the problems that come with them aren't worth the trouble.Nate
02/17/2023, 6:58 PMMansour Zayer
02/17/2023, 6:59 PMNate
02/17/2023, 7:01 PM(or I might just be mistaken all together)nope! you're totally right, we did use subprocess in v1 version of shell task
Carlos Cueto
02/17/2023, 7:07 PMprefect-shell
prefect-shell
GitHub as well:
https://github.com/PrefectHQ/prefect-shell/issues/69Andrew Huang
02/17/2023, 7:36 PMpip install git+<https://github.com/PrefectHQ/prefect-shell.git@flush_after_write>
Carlos Cueto
02/17/2023, 7:44 PMAndrew Huang
02/17/2023, 7:47 PMpip install -U git+<https://github.com/PrefectHQ/prefect-shell.git@flush_after_write>
Carlos Cueto
02/17/2023, 8:38 PMAndrew Huang
02/17/2023, 8:38 PMCarlos Cueto
02/17/2023, 10:34 PMAndrew Huang
02/17/2023, 10:35 PM