datitran/jupyter2slides

error when execute nbconvert

yrong opened this issue · 0 comments

yrong commented

jupyter nbconvert static/presentation_template.ipynb --to slides --reveal-prefix reveal.js-3.1.0 --config static/slides_config.py

'text/plain': ['<IPython.lib.display.YouTubeVideo at 0x10cd3ed68>']}, 'metadata': {}} is not valid under any of the given schemas

Failed validating 'oneOf' in code_cell['properties']['outputs']['items']:

On instance['cells'][7]['outputs'][0]:
{'data': {'image/jpeg': ['/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAUDBAgHCAgIBwgGBQgGBgUHBwYGCAcF...'],
'text/plain': ['<IPython.lib.display.YouTubeVideo at '
'0x10cd3ed68>']},
'metadata': {}}
Traceback (most recent call last):
File "/ssd/anaconda3/lib/python3.6/site-packages/ipython_genutils/ipstruct.py", line 132, in getattr
result = self[key]
KeyError: 'output_type'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/ssd/anaconda3/bin/jupyter-nbconvert", line 11, in
load_entry_point('nbconvert==5.1.1', 'console_scripts', 'jupyter-nbconvert')()
File "/ssd/anaconda3/lib/python3.6/site-packages/jupyter_core/application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/ssd/anaconda3/lib/python3.6/site-packages/traitlets/config/application.py", line 658, in launch_instance
app.start()
File "/ssd/anaconda3/lib/python3.6/site-packages/nbconvert/nbconvertapp.py", line 305, in start
self.convert_notebooks()
File "/ssd/anaconda3/lib/python3.6/site-packages/nbconvert/nbconvertapp.py", line 473, in convert_notebooks
self.convert_single_notebook(notebook_filename)
File "/ssd/anaconda3/lib/python3.6/site-packages/nbconvert/nbconvertapp.py", line 444, in convert_single_notebook
output, resources = self.export_single_notebook(notebook_filename, resources, input_buffer=input_buffer)
File "/ssd/anaconda3/lib/python3.6/site-packages/nbconvert/nbconvertapp.py", line 373, in export_single_notebook
output, resources = self.exporter.from_filename(notebook_filename, resources=resources)
File "/ssd/anaconda3/lib/python3.6/site-packages/nbconvert/exporters/exporter.py", line 171, in from_filename
return self.from_file(f, resources=resources, **kw)
File "/ssd/anaconda3/lib/python3.6/site-packages/nbconvert/exporters/exporter.py", line 189, in from_file
return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw)
File "/ssd/anaconda3/lib/python3.6/site-packages/nbconvert/exporters/slides.py", line 113, in from_notebook_node
return super(SlidesExporter, self).from_notebook_node(nb, resources=resources, **kw)
File "/ssd/anaconda3/lib/python3.6/site-packages/nbconvert/exporters/html.py", line 69, in from_notebook_node
return super(HTMLExporter, self).from_notebook_node(nb, resources, **kw)
File "/ssd/anaconda3/lib/python3.6/site-packages/nbconvert/exporters/templateexporter.py", line 236, in from_notebook_node
nb_copy, resources = super(TemplateExporter, self).from_notebook_node(nb, resources, **kw)
File "/ssd/anaconda3/lib/python3.6/site-packages/nbconvert/exporters/exporter.py", line 131, in from_notebook_node
nb_copy, resources = self._preprocess(nb_copy, resources)
File "/ssd/anaconda3/lib/python3.6/site-packages/nbconvert/exporters/exporter.py", line 308, in _preprocess
nbc, resc = preprocessor(nbc, resc)
File "/ssd/anaconda3/lib/python3.6/site-packages/nbconvert/preprocessors/coalescestreams.py", line 30, in wrappedfunc
nb.cells[index], resources = function(cell, resources, index)
File "/ssd/anaconda3/lib/python3.6/site-packages/nbconvert/preprocessors/coalescestreams.py", line 72, in coalesce_streams
if output.output_type == 'stream' and '\r' in output.text:
File "/ssd/anaconda3/lib/python3.6/site-packages/ipython_genutils/ipstruct.py", line 134, in getattr
raise AttributeError(key)
AttributeError: output_type