timonwong / OmniMarkupPreviewer

Sublime Text 2&3 plugin to live preview markup files, supported (not limited to) markup formats are markdown, reStructuredText, WikiCreole and textile.
MIT License
500 stars 74 forks source link

OmniMarkupPreviewer 404 #82

Open emettely opened 8 years ago

emettely commented 8 years ago

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!

dlareau commented 8 years ago

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

pahko commented 8 years ago

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.

dlareau commented 8 years ago

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

tankery commented 8 years ago

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~. (-_-|||)

gyqsophila commented 7 years ago

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

jfcherng commented 7 years ago

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

Hsiungchun commented 7 years ago

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

jintangWang commented 7 years ago

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

ccen commented 7 years ago

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.

djdeo commented 6 years ago

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