[IPython-dev] nbconvert bug?

Johan Beke johanbeke@hotmail....
Thu Sep 19 10:43:36 CDT 2013


Hello all,

I have a notebook which fails to convert. I've already encountered the problem (see user list) a few weeks ago with another notebook. The message is the same:

johan$ ipython nbconvert Fit_wind.ipynb 
[NbConvertApp] Using existing profile dir: u'/home/johan/.config/ipython/profile_default'
[NbConvertApp] Converting notebook Fit_wind.ipynb to html
[NbConvertApp] Support files will be in Fit_wind_files/
[NbConvertApp] Loaded template html_full.tpl
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 545, in launch_instance
    app.start()
  File "/usr/local/lib/python2.7/dist-packages/IPython/terminal/ipapp.py", line 358, in start
    return self.subapp.start()
  File "/usr/local/lib/python2.7/dist-packages/IPython/nbconvert/nbconvertapp.py", line 267, in start
    self.convert_notebooks()
  File "/usr/local/lib/python2.7/dist-packages/IPython/nbconvert/nbconvertapp.py", line 300, 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 289, 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 260, 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 85, in add_anchor
    h = ElementTree.fromstring(py3compat.cast_bytes_py2(html, encoding='utf-8'))
  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

Is this a bug or is there something wrong with my file or system? Notebook at: http://pastebin.com/FZu2j5xY

Kind regards,

Johan
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20130919/07a1a028/attachment.html 


More information about the IPython-dev mailing list