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

NameError: name 'TitlecaseExtension' is not defined #1

Open
engineervix opened this issue Dec 2, 2018 · 0 comments
Open

NameError: name 'TitlecaseExtension' is not defined #1

engineervix opened this issue Dec 2, 2018 · 0 comments
Labels

Comments

@engineervix
Copy link

engineervix commented Dec 2, 2018

I installed mdx_titlecase in a Python 3.6 virtual environment, alongside other third party markdown extensions. The output of pip freeze is as follows:

Markdown==3.0.1
MarkdownSuperscript==2.1.1
mdx-titlecase==1.2.0
titlecase==0.12.0

I ran the following command to transform my markdown to html:

python -m markdown -o html -x markdown.extensions.nl2br -x markdown.extensions.extra -x markdown.extensions.smarty -x 'mdx_superscript' -x 'mdx_titlecase' -f file.html file.md

I got the following error

Traceback (most recent call last):
  File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/foobar/.virtualenvs/some_virtual_env/lib/python3.6/site-packages/markdown/__main__.py", line 144, in <module>
    run()
  File "/home/foobar/.virtualenvs/some_virtual_env/lib/python3.6/site-packages/markdown/__main__.py", line 138, in run
    markdown.markdownFromFile(**options)
  File "/home/foobar/.virtualenvs/some_virtual_env/lib/python3.6/site-packages/markdown/core.py", line 408, in markdownFromFile
    md = Markdown(**kwargs)
  File "/home/foobar/.virtualenvs/some_virtual_env/lib/python3.6/site-packages/markdown/core.py", line 100, in __init__
    configs=kwargs.get('extension_configs', {}))
  File "/home/foobar/.virtualenvs/some_virtual_env/lib/python3.6/site-packages/markdown/core.py", line 126, in registerExtensions
    ext = self.build_extension(ext, configs.get(ext, {}))
  File "/home/foobar/.virtualenvs/some_virtual_env/lib/python3.6/site-packages/markdown/core.py", line 181, in build_extension
    return module.makeExtension(**configs)
  File "/home/foobar/.virtualenvs/some_virtual_env/lib/python3.6/site-packages/mdx_titlecase/__init__.py", line 29, in makeExtension
    return TitlecaseExtension(**kwargs)
NameError: name 'TitlecaseExtension' is not defined

What could the problem be?

@kdeldycke kdeldycke added the bug label Dec 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants