[Local prefect][dbt core][Windows OS] Hi all, I tr...
# prefect-dbt
j
[Local prefect][dbt core][Windows OS] Hi all, I tried adding dbt to my pipeline, but encounter an error saying:
RuntimeError: PID 29636 failed with return code 1.
and with another section saying:
Copy code
OneDrive\Documents\WindowsPowerShell\profile.ps1 cannot be loaded because running scripts is disabled  
on this system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
My code and more info in this thread:
The code:
Copy code
@task(name="dbt modelling")
def dbt_model():
    dbt_path = Path(f"dbt/my_project_name")

    dbt_run = DbtCoreOperation(
                    commands=[ "dbt debug"],
                    project_dir=dbt_path,
                    profiles_dir=dbt_path,
    )

    dbt_run.run()

    return
After further investigation, I found a thread that seems to have a solution to my issue. However, It requires me to conduct admin assess to PowerShell and change ExecutionPolicy from R*estricted* to Unrestricted, which I don't think is a feasible solution if you work in an organization. I wonder if this is something that could be fixed without needing to tamper with admin assess and/or ExecutionPolicy? https://prefect-community.slack.com/archives/C0470L5UV2M/p1684453953716139
s
Does this only happen when you use
prefect-dbt
, or does it happen with any Prefect flow?
j
Hi Sean, this only happens when I try to utilize prefect-dbt