https://prefect.io logo
Title
e

ep

03/17/2022, 12:13 PM
hey guys, am trying to run dbt job with prefect, but am always getting failed exit code 127. Any suggestion?
a

Anna Geller

03/17/2022, 1:43 PM
@ep this is not the right channel for this type of question - next time, it would be better if you could post that in the #prefect-community channel. The problem is that you are executing flow sort of twice: 1) using the CLI command - the command
prefect run -p test.py
will already execute the flow without you having to add the line
out = f.run()
2) using
out = f.run()
so to fix your error, you should remove the last line
apart from that, is your dbt package installed correctly? The 127 error code occurs when some command within your Bash script or on Bash command line is not found in any of the paths defined by PATH system environment variable. Can you try installing it this way?
pip install "prefect[dbt]"
e

ep

03/17/2022, 1:50 PM
Oh, didn't knew about the channel, am new here, sorry. And thanks for tge reply, let me check the installation
yeah, dbt is installed correctly, and it runs if I run "dbt run"
a

Anna Geller

03/17/2022, 1:56 PM
try removing that line
out = f.run()
e

ep

03/17/2022, 2:00 PM
yeah, already removed it, but still same error
i have tried all morning to fix this, but no luck
a

Anna Geller

03/17/2022, 8:37 PM
I don't have enough information to tell what has gone wrong here other than the suggestions mentioned above. Can you start from a fresh new environment and document all the steps you took before running this flow locally? Can you share the output of "prefect diagnostics"?