dbt Python Model error: 501 received http2 header with status: 404

Hello everyone, despite following all the steps on the site, I am getting the error “501 Received http2 header with status: 404” or “None Stream removed” on my dbt python model. The json serviceaccount I’m working with has all the privileges. (BQ - GStorage) I’m waiting for your help. I try to run it with the command dbt run -s my_python_model. Thanks.

def model(dbt,sesssion):

dbt.config(
    materialized='table'
)


return session.sql("select 'hello' as message ")

1 Like

@yunusemrekarazag Glad to see you’re trying out Python models! They’re a very new feature, and so debugging them is still a bit tricky (especially on GCP/Dataproc) while we get a handle for all the requisite pieces.

Based on some similar threads in the #dbt-core-python-models channel in the dbt Community Slack, it sounds like this issue comes up if:

  • You’ve configured the dataproc_region_name incorrectly, e.g. by putting us-central-1 instead of us-central1
  • You need to yeslist the IPs that originate from your dbt process (including dbt Cloud, if you’re using it), or you have another issue with your Dataproc network configuration (GCP docs)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.