Closed jankatins closed 3 years ago
I think the first is because the pdf building failed. I suspect that the latex file gets the filepath included somewhere in the document and this results in pdflatex thinking that \work
is a control sequence.
Not sure what is happening here, I don't get this error with the knitpy --to=pdf example\knitpy_overview.pymd
:-(
In [4]: from knitpy.knitpy import Knitpy
In [5]: report = Knitpy()
In [6]: report.render("./examples/knitpy_overview.pymd", output="pdf")
Out[6]: [u'C:\\data\\external\\knitpy\\examples\\knitpy_overview.pdf']
In [7]: cd examples/
C:\data\external\knitpy\examples
In [8]: report.render("knitpy_overview.pymd", output="pdf")
Out[8]: [u'C:\\data\\external\\knitpy\\examples\\knitpy_overview.pdf']
As I've found no way to see the temporary latex document (do you have temporary 'input.tex' somewhere in your AppData\Local\Temp\ folder?), I added latex output to knitpy in #17. Can you try that and send me the pymd and latex document (either here or via email -> jasc@gmx.net)?
Totally my bad, doh! I was trying to reproduce the issue to look for the .tex file and everything ran fine. Turns out I was originally not in the directory I thought I was... arg, sorry.
Maybe the thing to take away is, knitpy should check for the existence of the specified source pymd file and report a clear 'File not found' error instead of passing it all the way along to pypandoc.
Thoughts?
(PS I guess I should have started a new ticket instead of polluting your testing task)
No problem, changed the bug title. If you want to do a PR, this would be a nice start! :-)
Will do thanks!
From #14 via @thatcher:
Patch to #12 probably fine for unix/osx but returns an error on windows
Note this used to return an array of all types (pdf, html, docx) so I'm not sure if thats related to recent changes or if that is quietly failing on the pdf (see below). When I try to render just the pdf I get an error:
Unfortunately relative paths like './test.pymd' throw the same error. I can get around it via a full path:
Looks like pypandoc might not be liking how knitpy is passing the file paths on Windows so this could be considered a pypandoc issue. I'll gather a little more details to see if I can find a best solution.