https://dagster.io/ logo
#ask-community
Title
# ask-community
a

auerl

04/09/2022, 9:03 AM
Hey all, we got some issues with our dagster deployment. We are following https://docs.dagster.io/deployment/guides/kubernetes/deploying-with-helm and run it in a AWS EKS cluster with user deployments. Yesterday I built a new version of the user deployment container image, but now the container does error out with the error
Copy code
Traceback (most recent call last):
  File "/opt/venv/bin/dagster", line 5, in <module>
    from dagster.cli import main
  File "/opt/venv/lib/python3.8/site-packages/dagster/cli/__init__.py", line 12, in <module>
    from .new_project import new_project_cli
  File "/opt/venv/lib/python3.8/site-packages/dagster/cli/new_project.py", line 4, in <module>
    from dagster.generate import generate_new_project
  File "/opt/venv/lib/python3.8/site-packages/dagster/generate/__init__.py", line 1, in <module>
    from .generate import generate_new_project
  File "/opt/venv/lib/python3.8/site-packages/dagster/generate/generate.py", line 4, in <module>
    import jinja2
  File "/opt/venv/lib/python3.8/site-packages/jinja2/__init__.py", line 12, in <module>
    from .environment import Environment
  File "/opt/venv/lib/python3.8/site-packages/jinja2/environment.py", line 25, in <module>
    from .defaults import BLOCK_END_STRING
  File "/opt/venv/lib/python3.8/site-packages/jinja2/defaults.py", line 3, in <module>
    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
  File "/opt/venv/lib/python3.8/site-packages/jinja2/filters.py", line 13, in <module>
    from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/opt/venv/lib/python3.8/site-packages/markupsafe/__init__.py)
I tried to pin markupsafe by adding
RUN pip install markupsafe==2.0.1
to the Dockerfile, but without success. Strangely when i launch into the container and try to do the import
from markupsafe import soft_unicode
I dont get an error. Does anyone have an idea what the issue could be?
z

Zach

04/09/2022, 2:12 PM
not sure if there's a better versioning fix here, but it looks like the exception might be coming from within a virtual environment at /opt/venv - do you maybe need to source that environment before pinning markupsafe? something like
Copy code
RUN source /opt/venv/bin/activate && pip install markupsafe==2.0.1
r

rex

04/10/2022, 6:24 PM
This should have been fixed in 0.14.1 - https://docs.dagster.io/changelog#0141
k

Keshav

04/11/2022, 6:18 AM
Hi. You can try after downgrading to markupsafe=1.0.1 OR upgrade it to MarkupSafe=2.0.1
4 Views