[IPython-User] nbconvert error

Johan Beke johanbeke@hotmail....
Wed Aug 28 10:48:26 CDT 2013


Hello everyone,

I'm trying to convert a notebook to simple html. The notebook contains lots of latex whicht seems to be the trouble. Does anyone knows what is wrong? (Or is this a bug somehow)

ipython nbconvert example_v0.3.ipynb example.html

[NbConvertApp] Using existing profile dir: u'/home/johan/.config/ipython/profile_default'
[NbConvertApp] WARNING | pattern u'example.html' matched no files
[NbConvertApp] Converting notebook example_v0.3.ipynb to html
[NbConvertApp] Support files will be in example_v0.3_files/
[NbConvertApp] Loaded template html_full.tpl
pandoc: option `--mathjax' requires an argument URL
Try pandoc --help for more information.
pandoc: option `--mathjax' requires an argument URL
Try pandoc --help for more information.
Traceback (most recent call last):
  File "/usr/local/bin/ipython", line 6, in <module>
    start_ipython()
  File "/usr/local/lib/python2.7/dist-packages/IPython/__init__.py", line 118, in start_ipython
    return launch_new_instance(argv=argv, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/IPython/config/application.py", line 539, in launch_instance
    app.start()
  File "/usr/local/lib/python2.7/dist-packages/IPython/terminal/ipapp.py", line 356, in start
    return self.subapp.start()
  File "/usr/local/lib/python2.7/dist-packages/IPython/nbconvert/nbconvertapp.py", line 266, in start
    self.convert_notebooks()
  File "/usr/local/lib/python2.7/dist-packages/IPython/nbconvert/nbconvertapp.py", line 299, in convert_notebooks
    output, resources = exporter.from_filename(notebook_filename, resources=resources)
  File "/usr/local/lib/python2.7/dist-packages/IPython/nbconvert/exporters/exporter.py", line 288, in from_filename
    return self.from_notebook_node(nbformat.read(f, 'json'), resources=resources,**kw)
  File "/usr/local/lib/python2.7/dist-packages/IPython/nbconvert/exporters/exporter.py", line 259, in from_notebook_node
    output = self.template.render(nb=nb_copy, resources=resources)
  File "/usr/local/lib/python2.7/dist-packages/Jinja2-2.6-py2.7.egg/jinja2/environment.py", line 894, in render
    return self.environment.handle_exception(exc_info, True)
  File "/usr/local/lib/python2.7/dist-packages/IPython/nbconvert/exporters/../templates/html_full.tpl", line 1, in top-level template code
    {%- extends 'html_basic.tpl' -%}
  File "/usr/local/lib/python2.7/dist-packages/IPython/nbconvert/exporters/../templates/html_basic.tpl", line 1, in top-level template code
    {%- extends 'display_priority.tpl' -%}
  File "/usr/local/lib/python2.7/dist-packages/IPython/nbconvert/exporters/../templates/skeleton/display_priority.tpl", line 1, in top-level template code
    {%- extends 'null.tpl' -%}
  File "/usr/local/lib/python2.7/dist-packages/IPython/nbconvert/exporters/../templates/skeleton/null.tpl", line 26, in top-level template code
    {%- block body -%}
  File "/usr/local/lib/python2.7/dist-packages/IPython/nbconvert/exporters/../templates/html_full.tpl", line 62, in block "body"
    {{ super() }}
  File "/usr/local/lib/python2.7/dist-packages/IPython/nbconvert/exporters/../templates/skeleton/null.tpl", line 29, in block "body"
    {%- block any_cell scoped -%}
  File "/usr/local/lib/python2.7/dist-packages/IPython/nbconvert/exporters/../templates/skeleton/null.tpl", line 76, in block "any_cell"
    {%- block headingcell scoped-%}
  File "/usr/local/lib/python2.7/dist-packages/IPython/nbconvert/exporters/../templates/html_basic.tpl", line 64, in block "headingcell"
    {{ ("#" * cell.level + cell.source) | replace('\n', ' ') | strip_math_space | markdown2html | strip_files_prefix | add_anchor }}
  File "/usr/local/lib/python2.7/dist-packages/IPython/nbconvert/filters/strings.py", line 83, in add_anchor
    h = ElementTree.fromstring(py3compat.cast_bytes_py2(html))
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1283, in XML
    return parser.close()
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1636, in close
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1488, in _raiseerror
    raise err
ParseError: no element found: line 1, column 0

If you suspect this is an IPython bug, please report it at:
    https://github.com/ipython/ipython/issues
or send an email to the mailing list at ipython-dev@scipy.org

You can print a more detailed traceback right now with "%tb", or use "%debug"
to interactively debug it.

Extra-detailed tracebacks for bug-reporting purposes can be enabled via:
    c.Application.verbose_crash=True


Johan 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20130828/ceb47c1d/attachment.html 


More information about the IPython-User mailing list