Closed vongoh closed 10 years ago
@vongoh Hi, can you bring up your console (Ctrl+`), and paste its contents here?
And after update, you may have to restart sublime text sometimes.
I was seeing the same thing but today's update seems to have fixed it (but I'm having another problem, that I'll open another issue for). Just for reference, here's what was in my console when I got this particular error:
OmniMarkupPreviewer: [INFO] Launching web browser for http://localhost:51004/view/60
OmniMarkupPreviewer: [ERROR] Exception occured while rendering using MarkdownRenderer
Traceback (most recent call last):
File "C:\Users\chrisg\AppData\Roaming\Sublime Text 3\Packages\OmniMarkupPreviewer\OmniMarkupLib\RendererManager.py", line 266, in render_text
rendered_text = renderer.render(text, filename=filename)
File "C:\Users\chrisg\AppData\Roaming\Sublime Text 3\Packages\OmniMarkupPreviewer\OmniMarkupLib\Renderers/MarkdownRenderer.py", line 36, in render
extensions=self.extensions)
AttributeError: 'MarkdownRenderer' object has no attribute 'extensions'
Sry, did not have a chance to respond earlier with the console data.
The new update seems to have fixed my original issue - the preview opens fine. I cannot speak to cgarrad's issue, has not happened for me here yet.
I was having the same issue reported here (buffer_id([#]) is not valid (closed or unsupported file format)
) and hunted down a probable cause of the problem. If you're running two versions of Sublime (Sublime 2 and Sublime 3) and you have the plugin running in both instances at the same time, OmniMarkupPreviewer will try to connect to a websocket on the the same port (51004). It's a rare case—might want to open a new ticket for it? I'll copy this comment into a new issue and let you decide what you want to do about it.
Hitting this problem as well in most recent sublime text 3 omnimarkup running on OSX:
OmniMarkupPreviewer: [INFO] Launching web browser for http://127.0.0.1:51004/view/62
/Users/johnny/Library/Application Support/Sublime Text 3/Packages/python-markdown/st3/markdown/__init__.py:277: DeprecationWarning: Markdown's behavior of prepending "mdx_" to an extension name is deprecated. Use the full path to the extension with Python's dot notation (eg: "mdx_strikeout" instead of "strikeout"). The current behavior will raise an error in version 2.7. See the Release Notes for Python-Markdown version 2.6 for more info.
DeprecationWarning)
/Users/johnny/Library/Application Support/Sublime Text 3/Packages/python-markdown/st3/markdown/extensions/__init__.py:49: DeprecationWarning: Extension classes accepting a dict on the single keyword "config" is pending Deprecation. Each setting should be passed into the Class as a keyword directly. The "config" keyword is deprecated and raise an error in version 2.7. See the Release Notes for Python-Markdown version 2.6 for more info.
DeprecationWarning)
OmniMarkupPreviewer: [ERROR] Exception occured while rendering using MarkdownRenderer
Traceback (most recent call last):
File "/Users/johnny/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/johnny/Library/Application Support/Sublime Text 3/Packages/OmniMarkupPreviewer/OmniMarkupLib/Renderers/MarkdownRenderer.py", line 48, in render
extensions=self.extensions)
File "/Users/johnny/Library/Application Support/Sublime Text 3/Packages/python-markdown/st3/markdown/__init__.py", line 493, in markdown
md = Markdown(*args, **kwargs)
File "/Users/johnny/Library/Application Support/Sublime Text 3/Packages/python-markdown/st3/markdown/__init__.py", line 159, in __init__
configs=kwargs.get('extension_configs', {}))
File "/Users/johnny/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/johnny/Library/Application Support/Sublime Text 3/Packages/python-markdown/st3/markdown/__init__.py", line 291, in build_extension
return module.makeExtension(**configs)
File "/Users/johnny/Library/Application Support/Sublime Text 3/Packages/OmniMarkupPreviewer/OmniMarkupLib/Renderers/libs/mdx_strikeout.py", line 17, in makeExtension
return StrikeoutExtension(configs=configs)
File "/Users/johnny/Library/Application Support/Sublime Text 3/Packages/python-markdown/st3/markdown/extensions/__init__.py", line 51, in __init__
self.setConfigs(kwargs)
File "/Users/johnny/Library/Application Support/Sublime Text 3/Packages/python-markdown/st3/markdown/extensions/__init__.py", line 82, in setConfigs
self.setConfig(key, value)
File "/Users/johnny/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'
The config is the default and has not been customized:
"extensions": ["tables", "strikeout", "fenced_code", "codehilite"]
Solution was to remove omnimarkup, then manually delete Pacakges/python-markdown and reinstall omnimarkup again.
mniMarkupPreviewer: [ERROR] Exception occured while rendering using MarkdownRenderer Traceback (most recent call last): File "/Users/leafiy/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/leafiy/Library/Application Support/Sublime Text 3/Packages/OmniMarkupPreviewer/OmniMarkupLib/Renderers/MarkdownRenderer.py", line 48, in render extensions=self.extensions) File "/Users/leafiy/Library/Application Support/Sublime Text 3/Packages/python-markdown/st3/markdown/__init__.py", line 493, in markdown md = Markdown(*args, **kwargs) File "/Users/leafiy/Library/Application Support/Sublime Text 3/Packages/python-markdown/st3/markdown/__init__.py", line 159, in __init__ configs=kwargs.get('extension_configs', {})) File "/Users/leafiy/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/leafiy/Library/Application Support/Sublime Text 3/Packages/python-markdown/st3/markdown/__init__.py", line 291, in build_extension return module.makeExtension(**configs) File "/Users/leafiy/Library/Application Support/Sublime Text 3/Packages/OmniMarkupPreviewer/OmniMarkupLib/Renderers/libs/mdx_superscript.py", line 43, in makeExtension return SuperscriptExtension(configs=configs) File "/Users/leafiy/Library/Application Support/Sublime Text 3/Packages/python-markdown/st3/markdown/extensions/__init__.py", line 51, in __init__ self.setConfigs(kwargs) File "/Users/leafiy/Library/Application Support/Sublime Text 3/Packages/python-markdown/st3/markdown/extensions/__init__.py", line 82, in setConfigs self.setConfig(key, value) File "/Users/leafiy/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'
@leafiy see my comment
for some reason, I get the issue once again as soon as I restart sublime though. Following these steps:
There's a workaround for the problem in https://github.com/timonwong/OmniMarkupPreviewer/issues/85
@balboah - Thanks for the pointer to #85, Option 1 worked for me.
However, I'm still getting the issue without it:
Error:
Error: 404 Not Found
Sorry, the requested URL 'http://127.0.0.1:51004/view/28' caused an error:
'buffer_id(28) 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.
Console:
OmniMarkupPreviewer: [INFO] Launching web browser for http://127.0.0.1:51004/view/28
OmniMarkupPreviewer: [ERROR] Exception occured while rendering using MarkdownRenderer
Traceback (most recent call last):
File "C:\Users\D4\AppData\Roaming\Sublime Text 3\Packages\OmniMarkupPreviewer\OmniMarkupLib\RendererManager.py", line 266, in render_text
rendered_text = renderer.render(text, filename=filename)
File "C:\Users\D4\AppData\Roaming\Sublime Text 3\Packages\OmniMarkupPreviewer\OmniMarkupLib\Renderers/MarkdownRenderer.py", line 48, in render
extensions=self.extensions)
File "C:\Users\D4\AppData\Roaming\SUBLIM~1\Packages\PYTHON~1\st3\markdown\__init__.py", line 493, in markdown
md = Markdown(*args, **kwargs)
File "C:\Users\D4\AppData\Roaming\SUBLIM~1\Packages\PYTHON~1\st3\markdown\__init__.py", line 159, in __init__
configs=kwargs.get('extension_configs', {}))
File "C:\Users\D4\AppData\Roaming\SUBLIM~1\Packages\PYTHON~1\st3\markdown\__init__.py", line 185, in registerExtensions
ext = self.build_extension(ext, configs.get(ext, {}))
File "C:\Users\D4\AppData\Roaming\SUBLIM~1\Packages\PYTHON~1\st3\markdown\__init__.py", line 291, in build_extension
return module.makeExtension(**configs)
File "C:\Users\D4\AppData\Roaming\Sublime Text 3\Packages\OmniMarkupPreviewer\OmniMarkupLib\Renderers\libs\mdx_strikeout.py", line 17, in makeExtension
return StrikeoutExtension(configs=configs)
File "C:\Users\D4\AppData\Roaming\SUBLIM~1\Packages\PYTHON~1\st3\markdown\extensions\__init__.py", line 51, in __init__
self.setConfigs(kwargs)
File "C:\Users\D4\AppData\Roaming\SUBLIM~1\Packages\PYTHON~1\st3\markdown\extensions\__init__.py", line 82, in setConfigs
self.setConfig(key, value)
File "C:\Users\D4\AppData\Roaming\SUBLIM~1\Packages\PYTHON~1\st3\markdown\extensions\__init__.py", line 70, in setConfig
if isinstance(self.config[key][0], bool):
KeyError: 'configs'
Hi, got the update a few minutes ago. Used
Ctrl+Alt+O
to check out a markdown doc and