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

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

Closed
aarchiba opened this issue Aug 27, 2011 · 3 comments · Fixed by #1449
Closed

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

aarchiba opened this issue Aug 27, 2011 · 3 comments · Fixed by #1449
Milestone

Comments

@aarchiba
Copy link

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.

@minrk
Copy link
Member

minrk commented Aug 27, 2011

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'

@minrk
Copy link
Member

minrk commented Sep 9, 2011

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.

@takluyver
Copy link
Member

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

mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this issue Nov 3, 2014
Fix for bug ipython#735 : Images missing from XML/SVG export
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants