Skip to content
This repository

Images missing from XML/SVG export (for me) #735

Closed
aarchiba opened this Issue August 26, 2011 · 3 comments

3 participants

Anne Archibald Thomas Kluyver Min RK
Anne Archibald

When I use --pylab=inline and produce a very simple notebook with one image, both forms of HTML output work fine. But in the generated XML/SVG I get a message "Couldn't find image 8538394984452". I would guess that the backend is generating PNGs and not SVGs, and that the "Save as XML/HTML" function is not going back and regenerating them all. Asking matplotlib to generate an SVG and save it to disk yields a perfectly good SVG.

Further details: OS is Ubuntu Natty, ipython is 0.11, zeromq is 2.1.7, pyzmq is 2.1.7, all compiled and installed in my user environment. All other software is Natty standard. Machine is a core i3 laptop, ipython was run as "ipython qtconsole --pylab=inline".

ETA: I can't figure out how to either attach the broken XML notebook or get github to quote it (in spite of github's claim to use markdown). But there's not much to see; just some imports and a plot(arange(10),arange(10)), followed by the above message.

Min RK
Owner

Yes, I believe you have to already be using SVG figures for XML+SVG export to work (SVG -> PNG conversion works, but not PNG->SVG).

To switch the qtconsole to svg figures, add:

c.InlineBackendConfig.figure_format = 'svg'

in your config file.

Or switch at runtime with:

from IPython.zmq.pylab import backend_inline
cfg = backend_inline.InlineBackendConfig.instance()
backend_inline.figure_format = 'svg'
Min RK
Owner

Marking this as a quickfix, as the real fix in IPython should be to make the 'Couldn't find image' message describe the cause/solution more clearly, probably popping up in a dialog box after the failed export.

Min RK minrk referenced this issue October 25, 2011
Merged

%config magic #923

icmurray icmurray referenced this issue from a commit February 28, 2012
Commit has since been removed from the repository and is no longer available.
icmurray icmurray referenced this issue from a commit February 28, 2012
Commit has since been removed from the repository and is no longer available.
Thomas Kluyver takluyver closed this in c7e190d May 21, 2012
Thomas Kluyver
Collaborator

@aarchiba : Thanks again for the report, this is now 'fixed' in that there's an informative error message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.