Created
February 22, 2017 09:33
-
-
Save Ken-B/0f088e44c131c883c62b1fdd772b338f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ nbconvert git:(font_issues) jupyter nbconvert --version | |
5.2.0.dev | |
➜ nbconvert git:(font_issues) py.test --pyargs nbconvert | |
============================= test session starts ============================== | |
platform darwin -- Python 3.6.0, pytest-3.0.5, py-1.4.32, pluggy-0.4.0 | |
rootdir: /Users/ken/Coding/nbconvert, inifile: | |
collected 222 items | |
exporters/tests/test_asciidoc.py .... | |
exporters/tests/test_export.py ........... | |
exporters/tests/test_exporter.py ..... | |
exporters/tests/test_html.py ......... | |
exporters/tests/test_latex.py ..FFF..... | |
exporters/tests/test_markdown.py .... | |
exporters/tests/test_notebook.py ..... | |
exporters/tests/test_pdf.py ..F. | |
exporters/tests/test_python.py .... | |
exporters/tests/test_rst.py ..... | |
exporters/tests/test_script.py ...... | |
exporters/tests/test_slides.py ...... | |
exporters/tests/test_templateexporter.py ............. | |
filters/tests/test_ansi.py ... | |
filters/tests/test_citation.py ................... | |
filters/tests/test_datatypefilter.py ... | |
filters/tests/test_highlight.py ... | |
filters/tests/test_latex.py . | |
filters/tests/test_markdown.py ......... | |
filters/tests/test_metadata.py . | |
filters/tests/test_strings.py ............ | |
postprocessors/tests/test_serve.py . | |
preprocessors/tests/test_clearoutput.py .. | |
preprocessors/tests/test_coalescestreams.py ... | |
preprocessors/tests/test_csshtmlheader.py .. | |
preprocessors/tests/test_execute.py F....F.. | |
preprocessors/tests/test_extractoutput.py .. | |
preprocessors/tests/test_highlightmagics.py ... | |
preprocessors/tests/test_latex.py .. | |
preprocessors/tests/test_sanitize.py ......... | |
preprocessors/tests/test_svg2pdf.py .s | |
tests/test_nbconvertapp.py ................................... | |
utils/tests/test_io.py .. | |
utils/tests/test_pandoc.py .. | |
writers/tests/test_debug.py . | |
writers/tests/test_files.py .......... | |
writers/tests/test_stdout.py . | |
=================================== FAILURES =================================== | |
________________________ TestLatexExporter.test_export _________________________ | |
self = <nbconvert.exporters.tests.test_latex.TestLatexExporter testMethod=test_export> | |
@onlyif_cmds_exist('pandoc') | |
def test_export(self): | |
""" | |
Can a LatexExporter export something? | |
""" | |
> (output, resources) = LatexExporter().from_filename(self._get_notebook()) | |
exporters/tests/test_latex.py:37: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
exporters/exporter.py:171: in from_filename | |
return self.from_file(f, resources=resources, **kw) | |
exporters/exporter.py:189: in from_file | |
return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw) | |
exporters/latex.py:82: in from_notebook_node | |
return super(LatexExporter, self).from_notebook_node(nb, resources, **kw) | |
exporters/templateexporter.py:239: in from_notebook_node | |
output = self.template.render(nb=nb_copy, resources=resources) | |
../../../anaconda3/lib/python3.6/site-packages/jinja2/asyncsupport.py:76: in render | |
return original_render(self, *args, **kwargs) | |
../../../anaconda3/lib/python3.6/site-packages/jinja2/environment.py:1008: in render | |
return self.environment.handle_exception(exc_info, True) | |
../../../anaconda3/lib/python3.6/site-packages/jinja2/environment.py:780: in handle_exception | |
reraise(exc_type, exc_value, tb) | |
../../../anaconda3/lib/python3.6/site-packages/jinja2/_compat.py:37: in reraise | |
raise value.with_traceback(tb) | |
templates/latex/article.tplx:8: in top-level template code | |
((* extends cell_style *)) | |
templates/latex/style_ipython.tplx:56: in top-level template code | |
((( text | add_prompts(first='{\color{' ~ prompt_color ~ '}' ~ prompt ~ '[{\\color{' ~ prompt_color ~ '}' ~ execution_count ~ '}]:} ', cont=indention) ))) | |
templates/latex/base.tplx:6: in top-level template code | |
((*- extends 'document_contents.tplx' -*)) | |
templates/latex/document_contents.tplx:50: in top-level template code | |
((*- block figure scoped -*)) | |
templates/latex/skeleton/display_priority.tplx:5: in top-level template code | |
((*- extends 'null.tplx' -*)) | |
templates/latex/skeleton/null.tplx:30: in top-level template code | |
((*- block body -*)) | |
templates/latex/base.tplx:173: in block "body" | |
((( super() ))) | |
templates/latex/skeleton/null.tplx:32: in block "body" | |
((*- block any_cell scoped -*)) | |
templates/latex/skeleton/null.tplx:76: in block "any_cell" | |
((*- block markdowncell scoped-*)) | |
templates/latex/document_contents.tplx:67: in block "markdowncell" | |
((( cell.source | citation2latex | strip_files_prefix | convert_pandoc('markdown', 'json',extra_args=[]) | resolve_references | convert_pandoc('json','latex')))) | |
filters/filter_links.py:16: in resolve_references | |
return applyJSONFilters([resolve_one_reference], source) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:197: in applyJSONFilters | |
altered = walk(altered, action, format, meta) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:120: in walk | |
array.append(walk(item, action, format, meta)) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:113: in walk | |
array.append(walk(item, action, format, meta)) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:124: in walk | |
x[k] = walk(x[k], action, format, meta) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:111: in walk | |
item['c'] if 'c' in item else None, format, meta) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
key = 'Link' | |
val = [[{'c': 'header', 't': 'Str'}, {'c': [], 't': 'Space'}, {'c': 'links', 't': 'Str'}, {'c': [], 't': 'Space'}, {'c': 'are', 't': 'Str'}, {'c': [], 't': 'Space'}, ...], ['#numpy-and-matplotlib-examples', '']] | |
fmt = '', meta = {} | |
def resolve_one_reference(key, val, fmt, meta): | |
""" | |
This takes a tuple of arguments that are compatible with ``pandocfilters.walk()`` that | |
allows identifying hyperlinks in the document and transforms them into valid LaTeX | |
\\ref{} calls so that linking to headers between cells is possible. | |
See the documentation in ``pandocfilters.walk()`` for further information on the meaning | |
and specification of ``key``, ``val``, ``fmt``, and ``meta``. | |
""" | |
if key == 'Link': | |
> target = val[2][0] | |
E IndexError: list index out of range | |
filters/filter_links.py:29: IndexError | |
____________________ TestLatexExporter.test_export_article _____________________ | |
self = <nbconvert.exporters.tests.test_latex.TestLatexExporter testMethod=test_export_article> | |
@onlyif_cmds_exist('pandoc') | |
def test_export_article(self): | |
""" | |
Can a LatexExporter export using 'article' template? | |
""" | |
> (output, resources) = LatexExporter(template_file='article').from_filename(self._get_notebook()) | |
exporters/tests/test_latex.py:64: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
exporters/exporter.py:171: in from_filename | |
return self.from_file(f, resources=resources, **kw) | |
exporters/exporter.py:189: in from_file | |
return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw) | |
exporters/latex.py:82: in from_notebook_node | |
return super(LatexExporter, self).from_notebook_node(nb, resources, **kw) | |
exporters/templateexporter.py:239: in from_notebook_node | |
output = self.template.render(nb=nb_copy, resources=resources) | |
../../../anaconda3/lib/python3.6/site-packages/jinja2/asyncsupport.py:76: in render | |
return original_render(self, *args, **kwargs) | |
../../../anaconda3/lib/python3.6/site-packages/jinja2/environment.py:1008: in render | |
return self.environment.handle_exception(exc_info, True) | |
../../../anaconda3/lib/python3.6/site-packages/jinja2/environment.py:780: in handle_exception | |
reraise(exc_type, exc_value, tb) | |
../../../anaconda3/lib/python3.6/site-packages/jinja2/_compat.py:37: in reraise | |
raise value.with_traceback(tb) | |
templates/latex/article.tplx:8: in top-level template code | |
((* extends cell_style *)) | |
templates/latex/style_ipython.tplx:56: in top-level template code | |
((( text | add_prompts(first='{\color{' ~ prompt_color ~ '}' ~ prompt ~ '[{\\color{' ~ prompt_color ~ '}' ~ execution_count ~ '}]:} ', cont=indention) ))) | |
templates/latex/base.tplx:6: in top-level template code | |
((*- extends 'document_contents.tplx' -*)) | |
templates/latex/document_contents.tplx:50: in top-level template code | |
((*- block figure scoped -*)) | |
templates/latex/skeleton/display_priority.tplx:5: in top-level template code | |
((*- extends 'null.tplx' -*)) | |
templates/latex/skeleton/null.tplx:30: in top-level template code | |
((*- block body -*)) | |
templates/latex/base.tplx:173: in block "body" | |
((( super() ))) | |
templates/latex/skeleton/null.tplx:32: in block "body" | |
((*- block any_cell scoped -*)) | |
templates/latex/skeleton/null.tplx:76: in block "any_cell" | |
((*- block markdowncell scoped-*)) | |
templates/latex/document_contents.tplx:67: in block "markdowncell" | |
((( cell.source | citation2latex | strip_files_prefix | convert_pandoc('markdown', 'json',extra_args=[]) | resolve_references | convert_pandoc('json','latex')))) | |
filters/filter_links.py:16: in resolve_references | |
return applyJSONFilters([resolve_one_reference], source) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:197: in applyJSONFilters | |
altered = walk(altered, action, format, meta) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:120: in walk | |
array.append(walk(item, action, format, meta)) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:113: in walk | |
array.append(walk(item, action, format, meta)) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:124: in walk | |
x[k] = walk(x[k], action, format, meta) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:111: in walk | |
item['c'] if 'c' in item else None, format, meta) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
key = 'Link' | |
val = [[{'c': 'header', 't': 'Str'}, {'c': [], 't': 'Space'}, {'c': 'links', 't': 'Str'}, {'c': [], 't': 'Space'}, {'c': 'are', 't': 'Str'}, {'c': [], 't': 'Space'}, ...], ['#numpy-and-matplotlib-examples', '']] | |
fmt = '', meta = {} | |
def resolve_one_reference(key, val, fmt, meta): | |
""" | |
This takes a tuple of arguments that are compatible with ``pandocfilters.walk()`` that | |
allows identifying hyperlinks in the document and transforms them into valid LaTeX | |
\\ref{} calls so that linking to headers between cells is possible. | |
See the documentation in ``pandocfilters.walk()`` for further information on the meaning | |
and specification of ``key``, ``val``, ``fmt``, and ``meta``. | |
""" | |
if key == 'Link': | |
> target = val[2][0] | |
E IndexError: list index out of range | |
filters/filter_links.py:29: IndexError | |
_____________________ TestLatexExporter.test_export_basic ______________________ | |
self = <nbconvert.exporters.tests.test_latex.TestLatexExporter testMethod=test_export_basic> | |
@onlyif_cmds_exist('pandoc') | |
def test_export_basic(self): | |
""" | |
Can a LatexExporter export using 'article' template? | |
""" | |
> (output, resources) = LatexExporter(template_file='article').from_filename(self._get_notebook()) | |
exporters/tests/test_latex.py:55: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
exporters/exporter.py:171: in from_filename | |
return self.from_file(f, resources=resources, **kw) | |
exporters/exporter.py:189: in from_file | |
return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw) | |
exporters/latex.py:82: in from_notebook_node | |
return super(LatexExporter, self).from_notebook_node(nb, resources, **kw) | |
exporters/templateexporter.py:239: in from_notebook_node | |
output = self.template.render(nb=nb_copy, resources=resources) | |
../../../anaconda3/lib/python3.6/site-packages/jinja2/asyncsupport.py:76: in render | |
return original_render(self, *args, **kwargs) | |
../../../anaconda3/lib/python3.6/site-packages/jinja2/environment.py:1008: in render | |
return self.environment.handle_exception(exc_info, True) | |
../../../anaconda3/lib/python3.6/site-packages/jinja2/environment.py:780: in handle_exception | |
reraise(exc_type, exc_value, tb) | |
../../../anaconda3/lib/python3.6/site-packages/jinja2/_compat.py:37: in reraise | |
raise value.with_traceback(tb) | |
templates/latex/article.tplx:8: in top-level template code | |
((* extends cell_style *)) | |
templates/latex/style_ipython.tplx:56: in top-level template code | |
((( text | add_prompts(first='{\color{' ~ prompt_color ~ '}' ~ prompt ~ '[{\\color{' ~ prompt_color ~ '}' ~ execution_count ~ '}]:} ', cont=indention) ))) | |
templates/latex/base.tplx:6: in top-level template code | |
((*- extends 'document_contents.tplx' -*)) | |
templates/latex/document_contents.tplx:50: in top-level template code | |
((*- block figure scoped -*)) | |
templates/latex/skeleton/display_priority.tplx:5: in top-level template code | |
((*- extends 'null.tplx' -*)) | |
templates/latex/skeleton/null.tplx:30: in top-level template code | |
((*- block body -*)) | |
templates/latex/base.tplx:173: in block "body" | |
((( super() ))) | |
templates/latex/skeleton/null.tplx:32: in block "body" | |
((*- block any_cell scoped -*)) | |
templates/latex/skeleton/null.tplx:76: in block "any_cell" | |
((*- block markdowncell scoped-*)) | |
templates/latex/document_contents.tplx:67: in block "markdowncell" | |
((( cell.source | citation2latex | strip_files_prefix | convert_pandoc('markdown', 'json',extra_args=[]) | resolve_references | convert_pandoc('json','latex')))) | |
filters/filter_links.py:16: in resolve_references | |
return applyJSONFilters([resolve_one_reference], source) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:197: in applyJSONFilters | |
altered = walk(altered, action, format, meta) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:120: in walk | |
array.append(walk(item, action, format, meta)) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:113: in walk | |
array.append(walk(item, action, format, meta)) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:124: in walk | |
x[k] = walk(x[k], action, format, meta) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:111: in walk | |
item['c'] if 'c' in item else None, format, meta) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
key = 'Link' | |
val = [[{'c': 'header', 't': 'Str'}, {'c': [], 't': 'Space'}, {'c': 'links', 't': 'Str'}, {'c': [], 't': 'Space'}, {'c': 'are', 't': 'Str'}, {'c': [], 't': 'Space'}, ...], ['#numpy-and-matplotlib-examples', '']] | |
fmt = '', meta = {} | |
def resolve_one_reference(key, val, fmt, meta): | |
""" | |
This takes a tuple of arguments that are compatible with ``pandocfilters.walk()`` that | |
allows identifying hyperlinks in the document and transforms them into valid LaTeX | |
\\ref{} calls so that linking to headers between cells is possible. | |
See the documentation in ``pandocfilters.walk()`` for further information on the meaning | |
and specification of ``key``, ``val``, ``fmt``, and ``meta``. | |
""" | |
if key == 'Link': | |
> target = val[2][0] | |
E IndexError: list index out of range | |
filters/filter_links.py:29: IndexError | |
_____________________________ TestPDF.test_export ______________________________ | |
self = <nbconvert.exporters.tests.test_pdf.TestPDF testMethod=test_export> | |
@dec.onlyif_cmds_exist('xelatex') | |
@dec.onlyif_cmds_exist('pandoc') | |
def test_export(self): | |
"""Smoke test PDFExporter""" | |
with tempdir.TemporaryDirectory() as td: | |
newpath = os.path.join(td, os.path.basename(self._get_notebook())) | |
shutil.copy(self._get_notebook(), newpath) | |
> (output, resources) = self.exporter_class(latex_count=1).from_filename(newpath) | |
exporters/tests/test_pdf.py:38: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
exporters/exporter.py:171: in from_filename | |
return self.from_file(f, resources=resources, **kw) | |
exporters/exporter.py:189: in from_file | |
return self.from_notebook_node(nbformat.read(file_stream, as_version=4), resources=resources, **kw) | |
exporters/pdf.py:162: in from_notebook_node | |
nb, resources=resources, **kw | |
exporters/latex.py:82: in from_notebook_node | |
return super(LatexExporter, self).from_notebook_node(nb, resources, **kw) | |
exporters/templateexporter.py:239: in from_notebook_node | |
output = self.template.render(nb=nb_copy, resources=resources) | |
../../../anaconda3/lib/python3.6/site-packages/jinja2/asyncsupport.py:76: in render | |
return original_render(self, *args, **kwargs) | |
../../../anaconda3/lib/python3.6/site-packages/jinja2/environment.py:1008: in render | |
return self.environment.handle_exception(exc_info, True) | |
../../../anaconda3/lib/python3.6/site-packages/jinja2/environment.py:780: in handle_exception | |
reraise(exc_type, exc_value, tb) | |
../../../anaconda3/lib/python3.6/site-packages/jinja2/_compat.py:37: in reraise | |
raise value.with_traceback(tb) | |
templates/latex/article.tplx:8: in top-level template code | |
((* extends cell_style *)) | |
templates/latex/style_ipython.tplx:56: in top-level template code | |
((( text | add_prompts(first='{\color{' ~ prompt_color ~ '}' ~ prompt ~ '[{\\color{' ~ prompt_color ~ '}' ~ execution_count ~ '}]:} ', cont=indention) ))) | |
templates/latex/base.tplx:6: in top-level template code | |
((*- extends 'document_contents.tplx' -*)) | |
templates/latex/document_contents.tplx:50: in top-level template code | |
((*- block figure scoped -*)) | |
templates/latex/skeleton/display_priority.tplx:5: in top-level template code | |
((*- extends 'null.tplx' -*)) | |
templates/latex/skeleton/null.tplx:30: in top-level template code | |
((*- block body -*)) | |
templates/latex/base.tplx:173: in block "body" | |
((( super() ))) | |
templates/latex/skeleton/null.tplx:32: in block "body" | |
((*- block any_cell scoped -*)) | |
templates/latex/skeleton/null.tplx:76: in block "any_cell" | |
((*- block markdowncell scoped-*)) | |
templates/latex/document_contents.tplx:67: in block "markdowncell" | |
((( cell.source | citation2latex | strip_files_prefix | convert_pandoc('markdown', 'json',extra_args=[]) | resolve_references | convert_pandoc('json','latex')))) | |
filters/filter_links.py:16: in resolve_references | |
return applyJSONFilters([resolve_one_reference], source) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:197: in applyJSONFilters | |
altered = walk(altered, action, format, meta) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:120: in walk | |
array.append(walk(item, action, format, meta)) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:113: in walk | |
array.append(walk(item, action, format, meta)) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:124: in walk | |
x[k] = walk(x[k], action, format, meta) | |
../../../anaconda3/lib/python3.6/site-packages/pandocfilters.py:111: in walk | |
item['c'] if 'c' in item else None, format, meta) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
key = 'Link' | |
val = [[{'c': 'header', 't': 'Str'}, {'c': [], 't': 'Space'}, {'c': 'links', 't': 'Str'}, {'c': [], 't': 'Space'}, {'c': 'are', 't': 'Str'}, {'c': [], 't': 'Space'}, ...], ['#numpy-and-matplotlib-examples', '']] | |
fmt = '', meta = {} | |
def resolve_one_reference(key, val, fmt, meta): | |
""" | |
This takes a tuple of arguments that are compatible with ``pandocfilters.walk()`` that | |
allows identifying hyperlinks in the document and transforms them into valid LaTeX | |
\\ref{} calls so that linking to headers between cells is possible. | |
See the documentation in ``pandocfilters.walk()`` for further information on the meaning | |
and specification of ``key``, ``val``, ``fmt``, and ``meta``. | |
""" | |
if key == 'Link': | |
> target = val[2][0] | |
E IndexError: list index out of range | |
filters/filter_links.py:29: IndexError | |
________________________ TestExecute.test_allow_errors _________________________ | |
self = <nbconvert.preprocessors.tests.test_execute.TestExecute testMethod=test_allow_errors> | |
def test_allow_errors(self): | |
""" | |
Check that conversion continues if ``allow_errors`` is False. | |
""" | |
current_dir = os.path.dirname(__file__) | |
filename = os.path.join(current_dir, 'files', 'Skip Exceptions.ipynb') | |
res = self.build_resources() | |
res['metadata']['path'] = os.path.dirname(filename) | |
with assert_raises(CellExecutionError) as exc: | |
> self.run_notebook(filename, dict(allow_errors=False), res) | |
preprocessors/tests/test_execute.py:189: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
preprocessors/tests/test_execute.py:90: in run_notebook | |
input_nb = nbformat.read(f, 4) | |
../../../anaconda3/lib/python3.6/site-packages/nbformat/__init__.py:141: in read | |
return reads(fp.read(), as_version, **kwargs) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
def decode(self, input, final=False): | |
> return codecs.ascii_decode(input, self.errors)[0] | |
E UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 599: ordinal not in range(128) | |
../../../anaconda3/lib/python3.6/encodings/ascii.py:26: UnicodeDecodeError | |
________________________ TestExecute.test_run_notebooks ________________________ | |
self = <nbconvert.preprocessors.tests.test_execute.TestExecute testMethod=test_run_notebooks> | |
def test_run_notebooks(self): | |
"""Runs a series of test notebooks and compares them to their actual output""" | |
current_dir = os.path.dirname(__file__) | |
input_files = glob.glob(os.path.join(current_dir, 'files', '*.ipynb')) | |
for filename in input_files: | |
if os.path.basename(filename) == "Disable Stdin.ipynb": | |
continue | |
elif os.path.basename(filename) == "Interrupt.ipynb": | |
opts = dict(timeout=1, interrupt_on_timeout=True, allow_errors=True) | |
elif os.path.basename(filename) == "Skip Exceptions.ipynb": | |
opts = dict(allow_errors=True) | |
else: | |
opts = dict() | |
res = self.build_resources() | |
res['metadata']['path'] = os.path.dirname(filename) | |
> input_nb, output_nb = self.run_notebook(filename, opts, res) | |
preprocessors/tests/test_execute.py:120: | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
preprocessors/tests/test_execute.py:90: in run_notebook | |
input_nb = nbformat.read(f, 4) | |
../../../anaconda3/lib/python3.6/site-packages/nbformat/__init__.py:141: in read | |
return reads(fp.read(), as_version, **kwargs) | |
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ | |
self = <encodings.ascii.IncrementalDecoder object at 0x10dfb00b8> | |
input = b'{\n "cells": [\n {\n "cell_type": "code",\n "execution_count": 1,\n "metadata": {\n "collapsed": false\n ... ],\n "source": [\n "print(\'ok\')"\n ]\n }\n ],\n "metadata": {},\n "nbformat": 4,\n "nbformat_minor": 0\n}\n' | |
final = True | |
def decode(self, input, final=False): | |
> return codecs.ascii_decode(input, self.errors)[0] | |
E UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 599: ordinal not in range(128) | |
../../../anaconda3/lib/python3.6/encodings/ascii.py:26: UnicodeDecodeError | |
=============== 6 failed, 215 passed, 1 skipped in 99.53 seconds =============== |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment