OmniMarkupPreviewer icon indicating copy to clipboard operation
OmniMarkupPreviewer copied to clipboard

OmniMarkupPreviewer 404

Open emettely opened this issue 9 years ago • 10 comments

Hello,

When I open OmniMarkupPreviewer on Firefox, this is displayed:

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)'

**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.

I have Python 2.7.6 This is what it says in the console:

OmniMarkupPreviewer: [INFO] Launching web browser for http://127.0.0.1:51004/view/31
OmniMarkupPreviewer: [ERROR] Exception occured while rendering using MarkdownRenderer
  Traceback (most recent call last):
    File "./OmniMarkupLib/RendererManager.py", line 266, in render_text
    File "/Users/user/Library/Application Support/Sublime Text 2/Packages/OmniMarkupPreviewer/OmniMarkupLib/Renderers/MarkdownRenderer.py", line 48, in render
    extensions=self.extensions)
    File "./markdown/__init__.py", line 502, in markdown
    File "./markdown/__init__.py", line 161, in __init__
    for ext in extensions:
    File "./markdown/__init__.py", line 187, in registerExtensions
    pairs = [x.split("=") for x in ext_args.split(",")]
    File "./markdown/__init__.py", line 234, in build_extension
  UnboundLocalError: local variable 'module_name' referenced before assignment

Please help!

emettely avatar Aug 23 '15 07:08 emettely

Also having this issue, same console output (within local variations).

dlareau avatar Sep 03 '15 15:09 dlareau

I faced this today, just change the port, it seems another server is already using it. Go to Preferences -> Package Settings -> OmniMarkupPreviewr -> Settings - User and change the port:

{
    "server_host": "0.0.0.0",
    "server_port": 9998
}

that should work.

pahko avatar Nov 22 '15 03:11 pahko

I'm pretty sure that is a solution to a different issue. The main problem here is the traceback being produced in the console, not the error message the page produces. Changing the port number does not fix this issue (at least on my machine).

dlareau avatar Nov 22 '15 16:11 dlareau

Follow @pahko 's advise, my st2 on Mac OSX works. The key thing is to change the "server_host" to 0.0.0.0, rather than "server_port". I don't know the root cause. But who cares? it work~. (-_-|||)

tankery avatar Dec 22 '15 02:12 tankery

even follow @pahko advice ,it still doesn't work on ubuntu 16.04

gyqsophila avatar Aug 25 '16 14:08 gyqsophila

https://github.com/timonwong/OmniMarkupPreviewer/issues/85

jfcherng avatar Aug 25 '16 14:08 jfcherng

@AlphaGao1993 Have a try as follows http://stackoverflow.com/questions/35798823/omnimarkuppreviewer-404

Hsiungchun avatar Aug 30 '16 05:08 Hsiungchun

https://heinika.github.io/2016/08/20/sublime%E9%97%AE%E9%A2%98/ follow this,it works on my machine

jintangWang avatar Oct 18 '16 03:10 jintangWang

I've install another Sublime package "Markdown Preview" before, it seems they are in conflict. I solve this problem UnboundLocalError: local variable 'module_name' referenced before assignment by Package Control: Remove Package -> Markdown Preview It works for me.

ccen avatar Mar 28 '17 18:03 ccen

change server port won't work on Windows 10 either, still 404

djdeo avatar Oct 30 '17 02:10 djdeo