You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation for pdf on the command line suggests it supports the same template options as latex, which include a basic template; the example for converting to html as a library in the documentation suggests that in order to select a template, one sets the template_file property of an exporter to a string.
So I would have expected the following code to work:
exporter = nbconvert.PDFExporter()
exporter.template_file = 'basic'
nb = nbformat.read("foo.ipynb", 4)
pdf, resources = exporter.from_notebook_node(nb)
with open("test.pdf", "wb") as tp:
tp.write(pdf)
but it actually throws jinja2.exceptions.TemplateNotFound: basic
this is under nbconvert version 5.4.0, in case this is a known bug.
The text was updated successfully, but these errors were encountered:
Aaah, actually, this seems to be a documentation error---looking through the repo, there appears to be no basic latex template at all, so there probably shouldn't be one listed as an option in the docs.
The documentation for pdf on the command line suggests it supports the same template options as latex, which include a
basic
template; the example for converting to html as a library in the documentation suggests that in order to select a template, one sets thetemplate_file
property of an exporter to a string.So I would have expected the following code to work:
but it actually throws
jinja2.exceptions.TemplateNotFound: basic
this is under nbconvert version 5.4.0, in case this is a known bug.
The text was updated successfully, but these errors were encountered: