jankatins / knitpy

knitpy: Elegant, flexible and fast dynamic report generation with python
https://github.com/jankatins/knitpy
Other
368 stars 29 forks source link

pandoc 1.9.4 error on redhat fedora #8

Closed thatcher closed 9 years ago

thatcher commented 9 years ago

Ive had no problems ( other that #6 ) on a windows and osx machine I have full control over, but in my production environment i've got to make it work with red hat enterprise 6 which only supports pandoc 1.9.4 via their rpm repository. I am not sure if the following error is due to knitpy hoping for pandoc 1.12.3 or if Im missing something else ( maybe my latex library? ) or I haven't installed the pandoc 'readers' required?

Here is the way I reproduce the error:

>>> from knitpy.knitpy import Knitpy
>>> report = Knitpy()
>>> report.render('./knitpy_overview.pymd', output='html')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "build/bdist.linux-x86_64/egg/knitpy/knitpy.py", line 720, in render
  File "build/bdist.linux-x86_64/egg/pypandoc.py", line 94, in convert
  File "build/bdist.linux-x86_64/egg/pypandoc.py", line 135, in _convert
  File "build/bdist.linux-x86_64/egg/pypandoc.py", line 204, in _process_file
RuntimeError: Pandoc died with exitcode "7" during conversation: pandoc: Unknown reader: markdown+autolink_bare_uris+ascii_identifiers+tex_math_single_backslash-implicit_figures+fenced_code_attributes

Any insight would be greatly appreciated.

Here are the significant system details, please let me know if you need more details.

bash-4.1$ python
Python 2.7.9 |Continuum Analytics, Inc.| (default, Mar  9 2015, 16:20:48)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://binstar.org
>>> import platform
>>> platform.platform()
'Linux-2.6.32-431.23.3.el6.x86_64-x86_64-with-redhat-6.5-Santiago'
>>> exit()
bash-4.1$ pandoc --version
pandoc 1.9.4.1
Compiled with citeproc-hs 0.3.4, texmath 0.6.0.6, highlighting-kate 0.5.1.
jankatins commented 9 years ago

Yep, that's a problem with the pandoc version. Sorry, i can't really do something about this without adding a lot of compatibility code and I don't want to go into that (I don't actually do any conversation, it's all pandoc).

The first version which supports the markdown+xxx syntax is 1.10 (see here: http://pandoc.org/releases.html#pandoc-1.10-2013-01-19). As ipython nbconvert currently requires 1.12 and they have mostly the same requirement on pandoc as knitpy, it probably best to install a version higher than 1.12

jankatins commented 9 years ago

If you want to have pypandoc install a newer pandoc, please have a look at this issue: https://github.com/bebraw/pypandoc/issues/16

thatcher commented 9 years ago

Understood. I had seen that issue so I'd been following up in knitpy, pypandoc and pandoc to get feedback. Thanks for your quick response!

In some way I understand the suggested solution to bebraw/pypandoc#16 but I almost see bindling compiled executables as being something maybe better suited to bundling knitpy with Spyder installations as parallel to how RStudio does it (which would be a great conversation to start).

I'm the newbie and this is your project so I'll follow your lead. In either case I dont think the patch belongs in knitpy. If anywhere it makes sense in pypandoc.

I love RStudio mostly because of knitr integration so when knitpy is ready I'll help you in whatever way suites you to get it built into Spyder.

thatcher commented 9 years ago

Closing, issue was reported to pypandoc where patch, if any, would be more appropriate.