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

got crash when inserting a code block in MD. #69

Closed
houcheng opened this issue Feb 10, 2015 · 4 comments
Closed

got crash when inserting a code block in MD. #69

houcheng opened this issue Feb 10, 2015 · 4 comments

Comments

@houcheng
Copy link

Hi,
I got an exception when inserting a code block into markdown. Below is the error message shown in python console:

OmniMarkupPreviewer: [ERROR] Exception occured while rendering using MarkdownRenderer
  Traceback (most recent call last):
    File "/root/.config/sublime-text-3/Packages/OmniMarkupPreviewer/OmniMarkupLib/RendererManager.py", line 266, in render_text
    rendered_text = renderer.render(text, filename=filename)
    File "/root/.config/sublime-text-3/Packages/OmniMarkupPreviewer/OmniMarkupLib/Renderers/MarkdownRenderer.py", line 36, in render
    extensions=self.extensions)
    File "/root/.config/sublime-text-3/Packages/OmniMarkupPreviewer/OmniMarkupLib/Renderers/libs/markdown/__init__.py", line 411, in markdown
    return md.convert(text)
    File "/root/.config/sublime-text-3/Packages/OmniMarkupPreviewer/OmniMarkupLib/Renderers/libs/markdown/__init__.py", line 288, in convert
    self.lines = prep.run(self.lines)
    File "/root/.config/sublime-text-3/Packages/OmniMarkupPreviewer/OmniMarkupLib/Renderers/libs/markdown/extensions/fenced_code.py", line 140, in run
    code = highliter.hilite()
    File "/root/.config/sublime-text-3/Packages/OmniMarkupPreviewer/OmniMarkupLib/Renderers/libs/markdown/extensions/codehilite.py", line 90, in hilite
    lexer = get_lexer_by_name(self.lang)
    File "/root/.config/sublime-text-3/Installed Packages/Evernote.sublime-package/lib/pygments/lexers/__init__.py", line 87, in get_lexer_by_name
    if _alias.lower() in aliases:
  AttributeError: 'NoneType' object has no attribute 'lower'

This is the code block I added in markdown.

[PowerAdapter] -(Power)--> [Arndale] --(RS232)--> [LinuxHost]
                                |                    |
                             (ether)               (ether)
                                |                    |
                            [Ether switch] <---------+
@timonwong
Copy link
Owner

Hmm, it seems the Evernote package uses a incompatible pygments, you can try to disable the Evernote package for now.

@houcheng
Copy link
Author

Oppss. It is fixed by removing the Evernote package. Thanks a lot.

@Explorare
Copy link

Is there a way to fix this problem without remove Evernote package? I need both of the two packages a lot. I meet this error code when open README.md to OmniPackagePreviewer. Thanks

@Explorare
Copy link

Maintainer of <sublime-evernote> has updated a hotfix and this problem has been solved.
More details here

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