n1k0 / landslide

An HTML5 slideshow generator based on Markdown or reStructuredText
Apache License 2.0
172 stars 20 forks source link

If pygments is not installed, it raises the wrong error #10

Closed davidbgk closed 13 years ago

davidbgk commented 14 years ago

Due to the ImportError catch (cf. in landslide "from landslide.generator import Generator"), if pygments is not installed it will raise an import error at the "from generator import Generator" level.

It's weird that pip is not able to deal with dependencies in setup.py :(

n1k0 commented 13 years ago

I don't get the error anymore:

niko@NikoBook:~/Sites/landslide$ pip uninstall Pygments
Uninstalling Pygments:
  /usr/local/Cellar/python/2.7.1/bin/pygmentize
  /usr/local/Cellar/python/2.7.1/lib/python2.7/site-packages/Pygments-1.4-py2.7.egg-info
  /usr/local/Cellar/python/2.7.1/lib/python2.7/site-packages/pygments
Proceed (y/n)? y
  Successfully uninstalled Pygments
niko@NikoBook:~/Sites/landslide$ python src/landslide/main.py README.md 
Traceback (most recent call last):
  File "src/landslide/main.py", line 23, in <module>
    import generator
  File "/Users/niko/Sites/landslide/src/landslide/generator.py", line 29, in <module>
    import macro as macro_module
  File "/Users/niko/Sites/landslide/src/landslide/macro.py", line 22, in <module>
    import pygments
ImportError: No module named pygments

So I'm closing the issue. Feel free to reopen if I missed something.