This message was deleted.
# marvin-in-the-wild
s
This message was deleted.
m
Your message was too long by 335 tokens - please shorten it and try again. For reference, here's your message at the allowed limit:
I'm using
prefect-dbt==0.4.1
How to fix this :
```Flow could not be retrieved from deployment. Traceback (most recent call last): File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "/opt/prefect/prefect-kbn/pipelines/tt_marketing/tt_organic_main_flow.py", line 4, in from prefect_dbt.cli import DbtCoreOperation File "/usr/local/lib/python3.10/site-packages/prefect_dbt/__init__.py", line 4, in from .cli import ( # noqa File "/usr/local/lib/python3.10/site-packages/prefect_dbt/cli/__init__.py", line 1, in from .credentials import DbtCliProfile # noqa File "/usr/local/lib/python3.10/site-packages/prefect_dbt/cli/credentials.py", line 12, in from prefect_dbt.cli.configs import GlobalConfigs, TargetConfigs File "/usr/local/lib/python3.10/site-packages/prefect_dbt/cli/configs/__init__.py", line 9, in from .bigquery import BigQueryTargetConfigs # noqa File "/usr/local/lib/python3.10/site-packages/prefect_dbt/cli/configs/bigquery.py", line
It seems that the Prefect documentation and GitHub issues do not provide a direct solution to the
AttributeError: module 'openssl' has no attribute 'keys'
error. However, from the Prefect documentation, there is an example of how to correctly import and use `DbtCoreOperation`:
Copy code
python
from prefect_dbt.cli import DbtCoreOperation

@flow
def trigger_dbt_flow():
    dbt_cli_profile = DbtCliProfile.load("DBT-CORE-OPERATION-BLOCK-NAME-PLACEHOLDER")
    with DbtCoreOperation(
        commands=["dbt debug", "dbt run"],
        project_dir="PROJECT-DIRECTORY-PLACEHOLDER",
        profiles_dir="PROFILES-DIRECTORY-PLACEHOLDER",
        dbt_cli_profile=dbt_cli_profile,
    ) as dbt_operation:
        dbt_process = dbt_operation.trigger()
        dbt_process.wait_for_completion()
        result = dbt_process.fetch_result()
    return result
Prefect + Dbt Integration Regarding the
AttributeError
, it appears that this is a more generic python error not directly related to Prefect or listed as an open issue on Prefect's GitHub. It's possible that there is an issue with the installed version of
openssl
or
cryptography
library in your environment that is not compatible with the code. I would recommend checking your environment and ensuring all dependencies are correctly installed and are compatible with each other. If you continue to face this issue, consider reaching out to the maintainers of the involved packages.