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' #39

Open
ghost opened this issue Jun 21, 2022 · 0 comments
Open

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

ghost opened this issue Jun 21, 2022 · 0 comments

Comments

@ghost
Copy link

ghost commented Jun 21, 2022

It seems like an upstream dependency has changed such that a fresh pip install fastdoc no longer converts off the bat as expected:

% fastdoc_convert_all --path notebooks --dest_path asciidoc

Traceback (most recent call last):
  File "/Users/usr/.virtualenvs/pdsh2e/bin/fastdoc_convert_all", line 5, in <module>
    from fastdoc.asciidoc import fastdoc_convert_all
  File "/Users/usr/.virtualenvs/pdsh2e/lib/python3.10/site-packages/fastdoc/asciidoc.py", line 14, in <module>
    from .imports import *
  File "/Users/usr/.virtualenvs/pdsh2e/lib/python3.10/site-packages/fastdoc/imports.py", line 2, in <module>
    import os.path, re, nbformat, jupyter_contrib_nbextensions, glob, shutil
  File "/Users/usr/.virtualenvs/pdsh2e/lib/python3.10/site-packages/jupyter_contrib_nbextensions/__init__.py", line 5, in <module>
    import jupyter_nbextensions_configurator
  File "/Users/usr/.virtualenvs/pdsh2e/lib/python3.10/site-packages/jupyter_nbextensions_configurator/__init__.py", line 18, in <module>
    from notebook.base.handlers import APIHandler, IPythonHandler
  File "/Users/usr/.virtualenvs/pdsh2e/lib/python3.10/site-packages/notebook/base/handlers.py", line 21, in <module>
    from jinja2 import TemplateNotFound
  File "/Users/usr/.virtualenvs/pdsh2e/lib/python3.10/site-packages/jinja2/__init__.py", line 12, in <module>
    from .environment import Environment
  File "/Users/usr/.virtualenvs/pdsh2e/lib/python3.10/site-packages/jinja2/environment.py", line 25, in <module>
    from .defaults import BLOCK_END_STRING
  File "/Users/usr/.virtualenvs/pdsh2e/lib/python3.10/site-packages/jinja2/defaults.py", line 3, in <module>
    from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
  File "/Users/usr/.virtualenvs/pdsh2e/lib/python3.10/site-packages/jinja2/filters.py", line 13, in <module>
    from markupsafe import soft_unicode
ImportError: cannot import name 'soft_unicode' from 'markupsafe'

Fix seems to be to pin markupsafe to an older version (e.g., markupsafe==2.0.1), but it would probably be good to fix the import.

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

0 participants