When trying to run the following command:
dbt run
I get the following error:
Traceback (most recent call last): File "/opt/homebrew/bin/dbt", line 5, in <module> from dbt.cli.main import cli File "/opt/homebrew/lib/python3.11/site-packages/dbt/cli/__init__.py", line 1, in <module> from .main import cli as dbt_cli # noqa ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/dbt/cli/main.py", line 14, in <module> from dbt.cli import requires, params as p File "/opt/homebrew/lib/python3.11/site-packages/dbt/cli/requires.py", line 1, in <module> import dbt.tracking File "/opt/homebrew/lib/python3.11/site-packages/dbt/tracking.py", line 15, in <module> from dbt import version as dbt_version File "/opt/homebrew/lib/python3.11/site-packages/dbt/version.py", line 11, in <module> import dbt.semver File "/opt/homebrew/lib/python3.11/site-packages/dbt/semver.py", line 6, in <module> import dbt.utils File "/opt/homebrew/lib/python3.11/site-packages/dbt/utils.py", line 20, in <module> from dbt.events.types import RetryExternalCall, RecordRetryException File "/opt/homebrew/lib/python3.11/site-packages/dbt/events/__init__.py", line 1, in <module> from .adapter_endpoint import AdapterLogger # noqa: F401 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/dbt/events/adapter_endpoint.py", line 3, in <module> from dbt.events.functions import fire_event, EVENT_MANAGER File "/opt/homebrew/lib/python3.11/site-packages/dbt/events/functions.py", line 2, in <module> from dbt.events.base_types import BaseEvent, EventLevel, EventMsg File "/opt/homebrew/lib/python3.11/site-packages/dbt/events/base_types.py", line 4, in <module> from dbt.events import types_pb2 File "/opt/homebrew/lib/python3.11/site-packages/dbt/events/types_pb2.py", line 5, in <module> from google.protobuf.internal import builder as _builder ModuleNotFoundError: No module named 'google'
I have tried to uninstall dbt, dbt-postgres, google and reinstalling the modules. I had this dbt project running successfully before, but after creating a new environment I can’t get it to run. Current dbt and google modules from pip list:
db-dtypes 1.2.0
dbt 1.0.0.38.12
dbt-adapters 1.1.1
dbt-common 1.0.4
dbt-core 1.8.0
dbt-extractor 0.5.1
dbt-postgres 1.8.2
dbt-semantic-interfaces 0.5.1
google 3.0.0
google-api-core 2.19.0
google-auth 2.29.0
google-cloud-bigquery 3.23.1
google-cloud-core 2.4.1
google-cloud-dataproc 5.9.3
google-cloud-storage 2.16.0
google-crc32c 1.5.0
google-resumable-media 2.7.0
googleapis-common-protos 1.63.0
2
I think you are missing the Protobuf module required for serializing the structured data by dbt. Try doing pip install protobuf
. Should solve the issue.
1