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

Preview in example not working #47

Closed
JackAtOmenApps opened this issue Sep 27, 2018 · 3 comments
Closed

Preview in example not working #47

JackAtOmenApps opened this issue Sep 27, 2018 · 3 comments

Comments

@JackAtOmenApps
Copy link

I followed the procedures for running the example project, but Preview doesn't work. I got the following errors:

Internal Server Error: /martor/markdownify/
Traceback (most recent call last):
  File "/home/jdshueu/.local/share/virtualenvs/martor-pW1NQgAM/lib/python3.6/site-packages/Django-2.1.1-py3.6.egg/django/core/handlers/exception.py", line 34, in inner
    response = get_response(request)
  File "/home/jdshueu/.local/share/virtualenvs/martor-pW1NQgAM/lib/python3.6/site-packages/Django-2.1.1-py3.6.egg/django/core/handlers/base.py", line 126, in _get_response
    response = self.process_exception_by_middleware(e, request)
  File "/home/jdshueu/.local/share/virtualenvs/martor-pW1NQgAM/lib/python3.6/site-packages/Django-2.1.1-py3.6.egg/django/core/handlers/base.py", line 124, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "/home/jdshueu/.local/share/virtualenvs/martor-pW1NQgAM/lib/python3.6/site-packages/martor-1.3.3-py3.6.egg/martor/views.py", line 17, in markdownfy_view
    return HttpResponse(markdownify(request.POST['content']))
  File "/home/jdshueu/.local/share/virtualenvs/martor-pW1NQgAM/lib/python3.6/site-packages/martor-1.3.3-py3.6.egg/martor/utils.py", line 28, in markdownify
    extension_configs=MARTOR_MARKDOWN_EXTENSION_CONFIGS
  File "/home/jdshueu/.local/share/virtualenvs/martor-pW1NQgAM/lib/python3.6/site-packages/Markdown-3.0.1-py3.6.egg/markdown/core.py", line 390, in markdown
    md = Markdown(**kwargs)
  File "/home/jdshueu/.local/share/virtualenvs/martor-pW1NQgAM/lib/python3.6/site-packages/Markdown-3.0.1-py3.6.egg/markdown/core.py", line 100, in __init__
    configs=kwargs.get('extension_configs', {}))
  File "/home/jdshueu/.local/share/virtualenvs/martor-pW1NQgAM/lib/python3.6/site-packages/Markdown-3.0.1-py3.6.egg/markdown/core.py", line 126, in registerExtensions
    ext = self.build_extension(ext, configs.get(ext, {}))
  File "/home/jdshueu/.local/share/virtualenvs/martor-pW1NQgAM/lib/python3.6/site-packages/Markdown-3.0.1-py3.6.egg/markdown/core.py", line 181, in build_extension
    return module.makeExtension(**configs)
  File "/home/jdshueu/.local/share/virtualenvs/martor-pW1NQgAM/lib/python3.6/site-packages/martor-1.3.3-py3.6.egg/martor/extensions/del_ins.py", line 48, in makeExtension
    return DelInsExtension(configs=dict(configs))
  File "/home/jdshueu/.local/share/virtualenvs/martor-pW1NQgAM/lib/python3.6/site-packages/Markdown-3.0.1-py3.6.egg/markdown/extensions/__init__.py", line 42, in __init__
    self.setConfigs(kwargs)
  File "/home/jdshueu/.local/share/virtualenvs/martor-pW1NQgAM/lib/python3.6/site-packages/Markdown-3.0.1-py3.6.egg/markdown/extensions/__init__.py", line 73, in setConfigs
    self.setConfig(key, value)
  File "/home/jdshueu/.local/share/virtualenvs/martor-pW1NQgAM/lib/python3.6/site-packages/Markdown-3.0.1-py3.6.egg/markdown/extensions/__init__.py", line 61, in setConfig
    if isinstance(self.config[key][0], bool):
KeyError: 'configs'
@olinox14
Copy link

same error here!

@olinox14
Copy link

I just found out it is caused by the martor.extensions.del_ins extension: you can fix the bug by removing it from the MARTOR_MARKDOWN_EXTENSIONS list.

@skabbit
Copy link

skabbit commented Oct 3, 2018

Solving by downgrading Markdown 3.0.1 to 2.6.11
Seem to be the same problem as #49

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