https://prefect.io logo
t

Tyson Chavarie

07/06/2023, 6:40 PM
I'm trying to implement a dbt Cloud Credentials block but I'm getting an error. My code:
Copy code
from prefect_dbt.cloud import DbtCloudCredentials

dbt_cloud_credentials = DbtCloudCredentials.load("dbt-cloud")
here is the error I get:
Copy code
Traceback (most recent call last):
  File "/Users/tysonchavarie/Documents/code/livevox-prefect2/test-dbt.py", line 1, in <module>
    from prefect_dbt.cloud import DbtCloudCredentials
  File "/Users/tysonchavarie/Documents/code/livevox-prefect2/lib/python3.9/site-packages/prefect_dbt/__init__.py", line 4, in <module>
    from .cli import (  # noqa
  File "/Users/tysonchavarie/Documents/code/livevox-prefect2/lib/python3.9/site-packages/prefect_dbt/cli/__init__.py", line 1, in <module>
    from .credentials import DbtCliProfile  # noqa
  File "/Users/tysonchavarie/Documents/code/livevox-prefect2/lib/python3.9/site-packages/prefect_dbt/cli/credentials.py", line 7, in <module>
    from prefect_dbt.cli.configs import GlobalConfigs, TargetConfigs
  File "/Users/tysonchavarie/Documents/code/livevox-prefect2/lib/python3.9/site-packages/prefect_dbt/cli/configs/__init__.py", line 9, in <module>
    from .bigquery import BigQueryTargetConfigs  # noqa
  File "/Users/tysonchavarie/Documents/code/livevox-prefect2/lib/python3.9/site-packages/prefect_dbt/cli/configs/bigquery.py", line 21, in <module>
    class BigQueryTargetConfigs(BaseTargetConfigs):
  File "pydantic/main.py", line 197, in pydantic.main.ModelMetaclass.__new__
  File "pydantic/fields.py", line 506, in pydantic.fields.ModelField.infer
  File "pydantic/fields.py", line 436, in pydantic.fields.ModelField.__init__
  File "pydantic/fields.py", line 552, in pydantic.fields.ModelField.prepare
  File "pydantic/fields.py", line 668, in pydantic.fields.ModelField._type_analysis
  File "/Users/tysonchavarie/opt/miniconda3/lib/python3.9/typing.py", line 852, in __subclasscheck__
    return issubclass(cls, self.__origin__)
TypeError: issubclass() arg 1 must be a class
actually I think I fixed it by upgrading from pydantic 1.10.7 to 1.10.11...
n

Nate

07/10/2023, 7:18 PM
huh, weird! let us know if any issue persists
3 Views