ohbarye / markdown-server

Simple markdown server written in Python. It converts your markdown file to HTML and returns a response as text/html.
https://pypi.python.org/pypi/markdown-server
MIT License
44 stars 20 forks source link

No such file or directory: 'markdownserver/resources/css/github.css' #1

Open amitu opened 8 years ago

amitu commented 8 years ago

After a fresh install.

markdown-server==0.1.1 Python 2.7.11

Traceback (most recent call last):
  File "/Users/amitu/.pyenv/versions/home/bin/mdsvr", line 7, in <module>
    from markdownserver import main
  File "/Users/amitu/.pyenv/versions/home/lib/python2.7/site-packages/markdownserver/__init__.py", line 5, in <module>
    converter = MarkdownConverter()
  File "/Users/amitu/.pyenv/versions/home/lib/python2.7/site-packages/markdownserver/markdown_converter.py", line 9, in __init__
    css = codecs.open(css_root + css_name,encoding=ms_encoding,mode='r')
  File "/Users/amitu/.pyenv/versions/home/lib/python2.7/codecs.py", line 896, in open
    file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 2] No such file or directory: 'markdownserver/resources/css/github.css'
ohbarye commented 8 years ago

Ah, I assume that I'm dealing in those paths with wrong way... I will investigate.

ohbarye commented 8 years ago

@amitu I fixed the bug and released 0.1.3. Now, I think it would work well with the following command. (I confirmed only on my end, though.)

$ pip install markdown-server
$ markdownserver
$ open http://localhost:8009/sample.md

I'm very sorry for my late reply, but I truly appreciate you that you created this issue!

amitu commented 8 years ago

Thanks for the release.

Not fixed :-(

Traceback (most recent call last):
  File "/Users/amitu/.pyenv/versions/2.7.11/envs/burstic/bin/bottle.py", line 862, in _handle
    return route.call(**args)
  File "/Users/amitu/.pyenv/versions/2.7.11/envs/burstic/bin/bottle.py", line 1732, in wrapper
    rv = callback(*a, **ka)
  File "/Users/amitu/.pyenv/versions/2.7.11/envs/burstic/lib/python2.7/site-packages/markdownserver/__init__.py", line 11, in gfmize
    html_file_name = os.path.basename(converter.convert(resource))
  File "/Users/amitu/.pyenv/versions/2.7.11/envs/burstic/lib/python2.7/site-packages/markdownserver/markdown_converter.py", line 31, in convert
    code = md.markdown(self.read_md(src), extensions=[markdown_type])
  File "/Users/amitu/.pyenv/versions/2.7.11/envs/burstic/lib/python2.7/site-packages/markdownserver/markdown_converter.py", line 35, in read_md
    md_file = codecs.open(os.path.join(markdown_dir, file_name),encoding=ms_encoding,mode='r')
  File "/Users/amitu/.pyenv/versions/2.7.11/envs/burstic/lib/python2.7/codecs.py", line 896, in open
    file = __builtin__.open(filename, mode, buffering)
IOError: [Errno 2] No such file or directory: '/Users/amitu/.pyenv/versions/2.7.11/envs/burstic/lib/python2.7/site-packages/markdownserver/resources/markdown/foo.md'
`
ohbarye commented 8 years ago

Does your markdown file which you want to convert locate the following path?

'/Users/amitu/.pyenv/versions/2.7.11/envs/burstic/lib/python2.7/site-packages/markdownserver/resources/markdown/foo.md'

amitu commented 8 years ago

No. Its in current folder, ~/projects/burstic/foo.md.