Anyone got this error today? Traceback (most rece...
# prefect-community
d
Anyone got this error today? Traceback (most recent call last): File "/usr/local/bin/dbt", line 5, in <module> from dbt.main import main File "/usr/local/lib/python3.9/site-packages/dbt/main.py", line 11, in <module> import dbt.version File "/usr/local/lib/python3.9/site-packages/dbt/version.py", line 11, in <module> import dbt.semver File "/usr/local/lib/python3.9/site-packages/dbt/semver.py", line 8, in <module> import dbt.utils File "/usr/local/lib/python3.9/site-packages/dbt/utils.py", line 9, in <module> import jinja2 File "/usr/local/lib/python3.9/site-packages/jinja2/__init__.py", line 12, in <module> from .environment import Environment File "/usr/local/lib/python3.9/site-packages/jinja2/environment.py", line 25, in <module> from .defaults import BLOCK_END_STRING File "/usr/local/lib/python3.9/site-packages/jinja2/defaults.py", line 3, in <module> from .filters import FILTERS as DEFAULT_FILTERS # noqa: F401 File "/usr/local/lib/python3.9/site-packages/jinja2/filters.py", line 13, in <module> from markupsafe import soft_unicode ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/usr/local/lib/python3.9/site-packages/markupsafe/__init__.py) It seems that we have to downgrade markupsafe: Downgrading markupsafe to 2.0.1 fixes the issue on my side.
pip install markupsafe==2.0.1
k
Haven’t seen it..looks like a dbt dependency version conflict right?
d
Yes. It just happened today.
k
Gotcha that might be word reporting on their discourse if you feel like it
I suspect more people will run into it
d
yeah... seems it's dbt problem. not prefrect
m
Strange, in the current version of dbt the markupsafe package is pinned to the one you downgraded to: https://github.com/dbt-labs/dbt-core/blob/main/core/setup.py#L55
d
upgrading dbt to 1.0.2 could solve the issue... I'll let your guys know if it works.
m
Which version did you use before?
d
1.0.1
m
I see, in that version there is no explicit version of markupsafe specified. This is a dependency of Jina2, but set very broadly e.g
>0.23
so that’s why you explicitly had to downgrade it. Am alternative fix is to pin the version in the requirements of your application and use dbt 1.0.1.
Still think it is worth mentioning on their discourse/slack channel though… seems the release of the latest markupsafe is only 16hrs old so that’s why it was never a problem before…
💯 1
d
After I upgrade dbt to 1.0.2, the error is gone. Upgrading dbt or downgrading markupsafe with dbt version earlier than 1.0.2 works.
m
Indeed, in version 1.0.2, the markupsafe version is pinned to 2.0.1!