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

ModuleNotFoundError for extensions=['outline'] #4

Open
jonathanunderwood opened this issue Mar 16, 2019 · 0 comments
Open

ModuleNotFoundError for extensions=['outline'] #4

jonathanunderwood opened this issue Mar 16, 2019 · 0 comments

Comments

@jonathanunderwood
Copy link

The docs for this state that to use the extension you should do md.markdown(s, extensions=['outline',] which results in:

ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-44-e4a1d7afe35e> in <module>
----> 1 md.markdown(s, extensions=['tables', 'outline',])

~/.virtualenvs/ontology/lib/python3.7/site-packages/markdown/core.py in markdown(text, **kwargs)
    388 
    389     """
--> 390     md = Markdown(**kwargs)
    391     return md.convert(text)
    392 

~/.virtualenvs/ontology/lib/python3.7/site-packages/markdown/core.py in __init__(self, **kwargs)
     98         self.htmlStash = util.HtmlStash()
     99         self.registerExtensions(extensions=kwargs.get('extensions', []),
--> 100                                 configs=kwargs.get('extension_configs', {}))
    101         self.set_output_format(kwargs.get('output_format', 'xhtml'))
    102         self.reset()

~/.virtualenvs/ontology/lib/python3.7/site-packages/markdown/core.py in registerExtensions(self, extensions, configs)
    124         for ext in extensions:
    125             if isinstance(ext, util.string_type):
--> 126                 ext = self.build_extension(ext, configs.get(ext, {}))
    127             if isinstance(ext, Extension):
    128                 ext._extendMarkdown(self)

~/.virtualenvs/ontology/lib/python3.7/site-packages/markdown/core.py in build_extension(self, ext_name, configs)
    164 
    165         try:
--> 166             module = importlib.import_module(ext_name)
    167             logger.debug(
    168                 'Successfuly imported extension module "%s".' % ext_name

~/.virtualenvs/ontology/lib/python3.7/importlib/__init__.py in import_module(name, package)
    125                 break
    126             level += 1
--> 127     return _bootstrap._gcd_import(name[level:], package, level)
    128 
    129 

~/.virtualenvs/ontology/lib/python3.7/importlib/_bootstrap.py in _gcd_import(name, package, level)

~/.virtualenvs/ontology/lib/python3.7/importlib/_bootstrap.py in _find_and_load(name, import_)

~/.virtualenvs/ontology/lib/python3.7/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)

ModuleNotFoundError: No module named 'outline'

However, md.markdown(s, extensions=['mdx_outline',] seems to work just fine.

This is with Markdown==3.0.1 and python 3.7.2

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

1 participant