YSF
06/13/2023, 11:28 PMMarvin
06/13/2023, 11:29 PMsubprocess.run() inside a Prefect task can cause errors due to the way Prefect handles asynchronous execution and the event loop. When you use subprocess.run(), it may interfere with the event loop, causing unexpected behavior or errors.
To avoid these issues, you can use Prefect's built-in run_process function, which is designed to work well with Prefect tasks. You can find an example of how to use run_process in the Prefect source code here.
Remember, with great power comes great responsibility... or something like that.