Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nbconvert: Unicode error with minus sign #3698

Closed
dpsanders opened this issue Jul 19, 2013 · 2 comments · Fixed by #3699
Closed

nbconvert: Unicode error with minus sign #3698

dpsanders opened this issue Jul 19, 2013 · 2 comments · Fixed by #3699
Milestone

Comments

@dpsanders
Copy link
Contributor

Running
ipython nbconvert --format="latex" odes_clean.ipynb
I get a strange (to my mind) unicode error, which seems to be a minus sign, apparently in an SVG?

/bin/sh: /Applications/Inkscape.app/Contents/Resources/bin/inkscape: No such file or directory
/bin/sh: /Applications/Inkscape.app/Contents/Resources/bin/inkscape: No such file or directory
Traceback (most recent call last):
  File "/usr/local/bin/ipython", line 6, in <module>
    start_ipython()
  File "/Users/dsanders/development/ipython/IPython/__init__.py", line 118, in start_ipython
    return launch_new_instance(argv=argv, **kwargs)
  File "/Users/dsanders/development/ipython/IPython/config/application.py", line 539, in launch_instance
    app.start()
  File "/Users/dsanders/development/ipython/IPython/terminal/ipapp.py", line 362, in start
    return self.subapp.start()
  File "/Users/dsanders/development/ipython/IPython/nbconvert/nbconvertapp.py", line 176, in start
    self.convert_notebooks()
  File "/Users/dsanders/development/ipython/IPython/nbconvert/nbconvertapp.py", line 197, in convert_notebooks
    config=self.config)
  File "/Users/dsanders/development/ipython/IPython/nbconvert/exporters/export.py", line 61, in decorator
    return f(*args, **kwargs)
  File "/Users/dsanders/development/ipython/IPython/nbconvert/exporters/export.py", line 214, in export_by_name
    return globals()[function_name](nb, **kw)
  File "/Users/dsanders/development/ipython/IPython/nbconvert/exporters/export.py", line 61, in decorator
    return f(*args, **kwargs)
  File "/Users/dsanders/development/ipython/IPython/nbconvert/exporters/export.py", line 165, in export_latex
    return export(LatexExporter, nb, **kw)
  File "/Users/dsanders/development/ipython/IPython/nbconvert/exporters/export.py", line 61, in decorator
    return f(*args, **kwargs)
  File "/Users/dsanders/development/ipython/IPython/nbconvert/exporters/export.py", line 122, in export
    output, resources = exporter_instance.from_filename(nb, resources)
  File "/Users/dsanders/development/ipython/IPython/nbconvert/exporters/exporter.py", line 221, in from_filename
    return self.from_notebook_node(nbformat.read(f, 'json'), resources=resources,**kw)
  File "/Users/dsanders/development/ipython/IPython/nbconvert/exporters/exporter.py", line 190, in from_notebook_node
    nb_copy, resources = self._transform(nb_copy, resources)
  File "/Users/dsanders/development/ipython/IPython/nbconvert/exporters/exporter.py", line 442, in _transform
    nbc, resc = transformer(nbc, resc)
  File "/Users/dsanders/development/ipython/IPython/nbconvert/transformers/base.py", line 61, in __call__
    return self.call(nb,resources)
  File "/Users/dsanders/development/ipython/IPython/nbconvert/transformers/base.py", line 85, in call
    worksheet.cells[index], resources = self.transform_cell(cell, resources, index)
  File "/Users/dsanders/development/ipython/IPython/nbconvert/transformers/convertfigures.py", line 54, in transform_cell
    self._convert_figure(cell_out, resources, data_type, data)
  File "/Users/dsanders/development/ipython/IPython/nbconvert/transformers/convertfigures.py", line 63, in _convert_figure
    data = self.convert_figure(data_type, data)
  File "/Users/dsanders/development/ipython/IPython/nbconvert/transformers/svg2pdf.py", line 77, in convert_figure
    f.write(data)
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2212' in position 13282: ordinal not in range(128)
@minrk
Copy link
Member

minrk commented Jul 19, 2013

Try #3699

@dpsanders
Copy link
Contributor Author

Perfect! Many thanks!

On Fri, Jul 19, 2013 at 5:27 PM, Min RK notifications@github.com wrote:

Try #3698 #3698


Reply to this email directly or view it on GitHubhttps://github.com//issues/3698#issuecomment-21281255
.

Dr. David P. Sanders

Profesor Titular "A" / Associate Professor
Departamento de Física, Facultad de Ciencias
Universidad Nacional Autónoma de México (UNAM)

dpsanders@gmail.com
http://sistemas.fciencias.unam.mx/~dsanders

Cubículo / office: #414, 4o. piso del Depto. de Física

Tel.: +52 55 5622 4965

minrk added a commit that referenced this issue Jul 19, 2013
svg2pdf unicode fix

also tweaks to exceptions and config in svg2pdf

closes #3698
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
svg2pdf unicode fix

also tweaks to exceptions and config in svg2pdf

closes ipython#3698
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants