https://prefect.io logo
Title
y

Yehor Anisimov

06/11/2022, 5:41 AM
Hi, trying to run DbtShellTask using command "dbt run" but get such kind of error:
[2022-06-11 08:35:49+0300] ERROR - prefect.CloudTaskRunner | Task 'DbtShellTask': Exception encountered during task execution!
Traceback (most recent call last):
  File "C:\Users\User\PycharmProjects\demo\venv\lib\site-packages\prefect\engine\task_runner.py", line 880, in get_task_run_state
    value = prefect.utilities.executors.run_task_with_timeout(
  File "C:\Users\User\PycharmProjects\demo\venv\lib\site-packages\prefect\utilities\executors.py", line 468, in run_task_with_timeout
    return task.run(*args, **kwargs)  # type: ignore
  File "C:\Users\User\PycharmProjects\demo\venv\lib\site-packages\prefect\utilities\tasks.py", line 456, in method
    return run_method(self, *args, **kwargs)
  File "C:\Users\User\PycharmProjects\demo\venv\lib\site-packages\prefect\tasks\dbt\dbt.py", line 192, in run
    return super(DbtShellTask, self).run(
  File "C:\Users\User\PycharmProjects\demo\venv\lib\site-packages\prefect\utilities\tasks.py", line 456, in method
    return run_method(self, *args, **kwargs)
  File "C:\Users\User\PycharmProjects\demo\venv\lib\site-packages\prefect\tasks\shell.py", line 145, in run
    line = raw_line.decode("utf-8").rstrip()
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xad in position 7: invalid start byte
Any ideas what is the issue?
1
a

Anna Geller

06/11/2022, 8:09 PM
I'm not sure whether this task works on Windows - can you try using Git bash or WSL?
k

Kevin Kho

06/11/2022, 9:20 PM
Anna is on the right track I think. The
ShellTask
specifically only supports bash on Windows
y

Yehor Anisimov

06/12/2022, 10:14 AM
I see, thanks a lot, I'll try ubuntu machine