Hi all ! i'm trying to run a simple DbtCoreOperati...
# prefect-dbt
c
Hi all ! i'm trying to run a simple DbtCoreOperation( new to prefect also) just a dbt debug to see if it work but it run into an error that i do not understand since the code is quite simple (i'm on a local windows)
Copy code
from pathlib import Path
from prefect import flow
from prefect_dbt.cli.commands import trigger_dbt_cli_command, DbtCliProfile, DbtCoreOperation

PROJECT_DIR = Path(__file__).parent.parent / 'datawarehouse'
DBT_PROJECT_DIR = PROJECT_DIR / 'dbt_project.yml'
PROFILES_DIR = PROJECT_DIR / 'profiles.yml'


@flow(log_prints=True)
def dbt_model():
    result = DbtCoreOperation(
        commands=["dbt debug"],
        project_dir=DBT_PROJECT_DIR,
        profiles_path=PROFILES_DIR,
    ).run()
    return result


if __name__ == "__main__":
    dbt_model()
Copy code
the error: 
    decoded = self._decoder.decode(chunk)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen codecs>", line 322, in decode
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 in position 156: invalid start byte
11:16:36.933 | ERROR   | Flow run 'artichoke-cockatoo' - Finished in state Failed("Flow run encountered an exception. UnicodeDecodeError: 'utf-8' codec can't decode byte 0x82 in position 156: invalid start byte")