# ask-community


04/09/2022, 9:03 AM
Hey all, we got some issues with our dagster deployment. We are following 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/", line 12, in <module>
    from .new_project import new_project_cli
  File "/opt/venv/lib/python3.8/site-packages/dagster/cli/", line 4, in <module>
    from dagster.generate import generate_new_project
  File "/opt/venv/lib/python3.8/site-packages/dagster/generate/", line 1, in <module>
    from .generate import generate_new_project
  File "/opt/venv/lib/python3.8/site-packages/dagster/generate/", line 4, in <module>
    import jinja2
  File "/opt/venv/lib/python3.8/site-packages/jinja2/", line 12, in <module>
    from .environment import Environment
  File "/opt/venv/lib/python3.8/site-packages/jinja2/", line 25, in <module>
    from .defaults import BLOCK_END_STRING
  File "/opt/venv/lib/python3.8/site-packages/jinja2/", line 3, in <module>
    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
  File "/opt/venv/lib/python3.8/site-packages/jinja2/", 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/
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?


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


04/10/2022, 6:24 PM
This should have been fixed in 0.14.1 -


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