Cryptic errors in ShellTask -
Hi, I'm running a flow with a number of shellTasks, and encountering errors like:
2022-04-14 09:42:06-0600] ERROR - prefect.TaskRunner | Task 'ShellTask[0]': Exception encountered during task execution!
Traceback (most recent call last):
File "/blah/python3.9/site-packages/prefect/engine/task_runner.py", line 880, in get_task_run_state
value = prefect.utilities.executors.run_task_with_timeout(
File "/blah/python3.9/site-packages/prefect/utilities/executors.py", line 468, in run_task_with_timeout
return task.run(*args, **kwargs) # type: ignore
File "/blah/python3.9/site-packages/prefect/utilities/tasks.py", line 456, in method
return run_method(self, *args, **kwargs)
File "/blah/python3.9/site-packages/prefect/tasks/shell.py", line 131, in run
tmp.write(command.encode())
AttributeError: 'list' object has no attribute 'encode'
I have a couple of questions:
• Is there a way to tag shell_tasks such that you can see some clue as to which one failed?
• Can I get a better description of the failure
At the moment I have
shell_task = ShellTask(log_stderr=True, return_all=True, stream_output=True)