Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ImportError: cannot import name 'soft_unicode' from 'markupsafe' #330

Closed
miltondp opened this issue Mar 15, 2022 · 4 comments
Closed

ImportError: cannot import name 'soft_unicode' from 'markupsafe' #330

miltondp opened this issue Mar 15, 2022 · 4 comments

Comments

@miltondp
Copy link
Contributor

Manubot builds in Github Actions started to fail today, with this error in the Build Manuscript step:

bash build/build.sh
  shell: /bin/bash --login {0}
  env:
    GITHUB_PULL_REQUEST_SHA: 2771a1d82d807d[3](https://github.com/greenelab/clustermatch-gene-expr-manuscript/runs/5560545444?check_suite_focus=true#step:8:3)8ffb9d3661000828c1cb82b[4](https://github.com/greenelab/clustermatch-gene-expr-manuscript/runs/5560545444?check_suite_focus=true#step:8:4)9
    SPELLCHECK: true
    BUILD_DOCX: true
    TRIGGERING_SHA_7: 2771a1d
    DEFAULT_BRANCH: main
    DEFAULT_BRANCH_REF: refs/heads/main
    CONDA: /usr/share/miniconda3
    CONDA_PKGS_DIR: /home/runner/conda_pkgs_dir
Retrieving and processing reference metadata
Traceback (most recent call last):
  File "/usr/share/miniconda3/envs/manubot/bin/manubot", line 8, in <module>
    sys.exit(main())
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/manubot/command.py", line 271, in main
    function(args)
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/manubot/process/process_command.py", line 32, in cli_process
    from manubot.process.util import prepare_manuscript
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/manubot/process/util.py", line 8, in <module>
    import jinja2
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/jinja2/__init__.py", line 12, in <module>
    from .environment import Environment
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/jinja2/environment.py", line 2[5](https://github.com/greenelab/clustermatch-gene-expr-manuscript/runs/5560545444?check_suite_focus=true#step:8:5), in <module>
    from .defaults import BLOCK_END_STRING
  File "/usr/share/miniconda3/envs/manubot/lib/python3.[7](https://github.com/greenelab/clustermatch-gene-expr-manuscript/runs/5560545444?check_suite_focus=true#step:8:7)/site-packages/jinja2/defaults.py", line 3, in <module>
    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
  File "/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/jinja2/filters.py", line [13](https://github.com/greenelab/clustermatch-gene-expr-manuscript/runs/5560545444?check_suite_focus=true#step:8:13), in <module>
    from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe' (/usr/share/miniconda3/envs/manubot/lib/python3.7/site-packages/markupsafe/__init__.py)
Error: Process completed with exit code 1.

Seems to be related to this issue in markupsafe. I fixed the problem by fixing markupsafe version to 2.0.1.

@agitter
Copy link
Member

agitter commented Mar 15, 2022

We've seen a few users hitting that issue (#329, manubot/rootstock#459). I'm glad you were able to resolve it.

@dhimmel should we pin an issue here, in the rootstock issues, or at both locations to alert users of this error and provide advice on how to fix it?

@miltondp
Copy link
Contributor Author

Ops, sorry I didn't see those!

@agitter
Copy link
Member

agitter commented Mar 15, 2022

No problem. It's a very common issue, so we should think about how to better advertise the solution.

@dhimmel dhimmel pinned this issue Mar 15, 2022
@dhimmel
Copy link
Member

dhimmel commented Mar 15, 2022

I pinned this issue for manubot/manubot.

@dhimmel dhimmel closed this as completed Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants