OmniMarkupPreviewer: 404 error on preview ... "buffer_id(29) is not valid (closed or unsupported file format)"

When I attempt to preview a MD file, I get the following error in the browser:

"Error: 404 Not Found Sorry, the requested URL ‘http://127.0.0.1:51004/view/29’ caused an error:

‘buffer_id(29) is not valid (closed or unsupported file format)’

NOTE: If you run multiple instances of Sublime Text, you may want to adjust the server_port option in order to get this plugin work again."

This is what I see in the console:

OmniMarkupPreviewer: [INFO] Launching web browser for http://127.0.0.1:51004/view/29 OmniMarkupPreviewer: [ERROR] Exception occured while rendering using MarkdownRenderer Traceback (most recent call last): File “/Users/BirdyOz/Library/Application Support/Sublime Text 3/Packages/OmniMarkupPreviewer/OmniMarkupLib/RendererManager.py”, line 266, in render_text rendered_text = renderer.render(text, filename=filename) File “/Users/BirdyOz/Library/Application Support/Sublime Text 3/Packages/OmniMarkupPreviewer/OmniMarkupLib/Renderers/MarkdownRenderer.py”, line 48, in render extensions=self.extensions) File “/Users/BirdyOz/Library/Application Support/Sublime Text 3/Packages/python-markdown/st3/markdown/init.py”, line 493, in markdown md = Markdown(_args, *_kwargs) File “/Users/BirdyOz/Library/Application Support/Sublime Text 3/Packages/python-markdown/st3/markdown/init.py”, line 159, in init configs=kwargs.get(‘extension_configs’, {})) File “/Users/BirdyOz/Library/Application Support/Sublime Text 3/Packages/python-markdown/st3/markdown/init.py”, line 185, in registerExtensions ext = self.build_extension(ext, configs.get(ext, {})) File “/Users/BirdyOz/Library/Application Support/Sublime Text 3/Packages/python-markdown/st3/markdown/init.py”, line 291, in build_extension return module.makeExtension(**configs) File “/Users/BirdyOz/Library/Application Support/Sublime Text 3/Packages/OmniMarkupPreviewer/OmniMarkupLib/Renderers/libs/mdx_strikeout.py”, line 17, in makeExtension return StrikeoutExtension(configs=configs) File “/Users/BirdyOz/Library/Application Support/Sublime Text 3/Packages/python-markdown/st3/markdown/extensions/init.py”, line 51, in init self.setConfigs(kwargs) File “/Users/BirdyOz/Library/Application Support/Sublime Text 3/Packages/python-markdown/st3/markdown/extensions/init.py”, line 82, in setConfigs self.setConfig(key, value) File “/Users/BirdyOz/Library/Application Support/Sublime Text 3/Packages/python-markdown/st3/markdown/extensions/init.py”, line 70, in setConfig if isinstance(self.config[key][0], bool): KeyError: ‘configs’

I have read other issue resolutions. I do not have multiple versions of ST running. I have tried the “fix” whereby you change the ports, but this did not resolve the issue.

About this issue

  • Original URL
  • State: open
  • Created 9 years ago
  • Reactions: 1
  • Comments: 35

Commits related to this issue

Most upvoted comments

Quick Fix 1: Remove Strikethrough Extension

Sublime Text > Preferences > Package Settings > OmniMarkupPreviewer > Settings - User paste the following to remove the strikeout package.

{
    "renderer_options-MarkdownRenderer": {
        "extensions": ["tables", "fenced_code", "codehilite"]
    }
}

Quick Fix 2: Fix the Strikethrough Extension (if you need it)

Find the python-markdown sublime package.

On the Mac: subl "/Users/<username>/Library/Application Support/Sublime Text 3/Packages/OmniMarkupPreviewer/OmniMarkupLib/Renderers/libs/mdx_strikeout.py"

Replace the makeExtension() method with the following:

def makeExtension(*args, **kwargs):
    return StrikeoutExtension(*args, **kwargs)

Save, quit and reload Sublime Text.

extensions error, ImportError: No module named ‘tables’ https://gitmemory.com/issue/timonwong/OmniMarkupPreviewer/138/562414026

Preferences > Package Settings > OmniMarkupPreviewer > Settings - User

{
    "server_host": "0.0.0.0",
    "server_port": 51004,
    "renderer_options-MarkdownRenderer":
    {
        "extensions": ["markdown.extensions.tables", "markdown.extensions.fenced_code", "markdown.extensions.codehilite"]
    }
}

it works on my sublime version 3.2.2-3211 🤞

extensions error, ImportError: No module named ‘tables’ https://gitmemory.com/issue/timonwong/OmniMarkupPreviewer/138/562414026

Preferences > Package Settings > OmniMarkupPreviewer > Settings - User

{
    "server_host": "0.0.0.0",
    "server_port": 51004,
    "renderer_options-MarkdownRenderer":
    {
        "extensions": ["markdown.extensions.tables", "markdown.extensions.fenced_code", "markdown.extensions.codehilite"]
    }
}

it works on my sublime version 3.2.2-3211 🤞

Thanks, this works for me

It works for me.

@scuml Thanks. Quick Fix 1 works

Thanks. Quick Fix 1 works

@scuml Thank u! Quick Fix 2 works!~

Quick Fix 1 should be the default settings. But Latest commit 21921ac on 15 Jun 2015, seems no more maintain ?

It because sublimetext-markdown-preview was so slow to show a preview that I switched to OmniMarkupPreviewer. Just now, I looked back to markdown-preview and found add below config could make it as fast as this:

{
    "parser": "markdown",
    "enabled_parsers": ["markdown"]
}

Thanks. Quick Fix 1 works