question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Reactions:1
  • Comments:35

github_iconTop GitHub Comments

207reactions
scumlcommented, Dec 30, 2015

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.

22reactions
geekyouthcommented, Mar 7, 2020

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 🤞

Read more comments on GitHub >

github_iconTop Results From Across the Web

sublimetext3 - OmniMarkupPreviewer 404
Error: 404 Not Found Sorry, the requested URL 'http://127.0.0.1:51004/view/31' caused an error: 'buffer_id(31) is not valid (closed or unsupported file format)' ...
Read more >
404 error on preview ... "buffer_id(29) is not valid (closed or ...
Quick Fix 1: Remove Strikethrough Extension Sublime Text > Preferences > Package Settings > OmniMarkupPreviewer > Settings - User paste the ...
Read more >
404 error on preview ... "buffer_id(29) is not valid (closed or ...
404 error on preview ... "buffer_id(29) is not valid (closed or unsupported file format)" ... "Error: 404 Not Found Sorry, the requested URL ......
Read more >
How to Fix WordPress 404 Not Found Error [8 Easy ...
You have opened an incorrect URL. Poorly coded plugin/theme. Many WordPress themes offer creative layouts & content options to display the 404 ......
Read more >
Error 404: 4 Ways to Fix It
Error 404 is a response code, meaning the server could not locate the ... domain points to an incorrect DNS address, files or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found