[IPython-User] Can't load image with IPython.core.display.Image

MinRK benjaminrk@gmail....
Fri Jun 29 12:04:31 CDT 2012


Image(filename='r.png')

On Fri, Jun 29, 2012 at 1:36 AM, klo uo <klonuo@gmail.com> wrote:

> If I type this:
>
>  In [1]: from IPython.core.display import Image
>  In [2]: Image('r.png')
>
> in IPython qtconsole, I don't get any output. If I run it in IPython3
> qtconsole I get traceback:
>
>  | Traceback (most recent call last):
>  |   File "/.../IPython/frontend/qt/base_frontend_mixin.py", line
> 109, in _dispatch
>  |     handler(msg)
>  |   File "/.../IPython/frontend/qt/console/rich_ipython_widget.py",
> line 126, in _handle_pyout
>  |     self._append_png(decodestring(data['image/png'].encode('ascii')),
> True)
>  |   File "/usr/lib/python3.2/base64.py", line 367, in decodestring
>  |     return decodebytes(s)
>  |   File "/usr/lib/python3.2/base64.py", line 360, in decodebytes
>  |     return binascii.a2b_base64(s)
>  | binascii.Error: Incorrect padding
>
> r.png is in attachment.
>
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20120629/4be99abb/attachment.html 


More information about the IPython-User mailing list