Closed ghost closed 9 years ago
My fault ; I wrote this line of code with python 2.7 and did not test with python 3.
I fix this in PR #30
Fixed in 4b945fd0c20e65e662900728551e20006d5ad92f
Still getting the same error for display()
:
---------------------------------------------------------------------------
LookupError Traceback (most recent call last)
<ipython-input-32-4805ed8aa6a4> in <module>()
----> 1 mplleaflet.display()
/home/aflyax/anaconda3/lib/python3.5/site-packages/mplleaflet/_display.py in display(fig, closefig, **kwargs)
153 # We embed everything in an iframe.
154 iframe_html = '<iframe src="data:text/html;base64,{html}" width="{width}" height="{height}"></iframe>'\
--> 155 .format(html = html.encode('base64'),
156 width = '100%',
157 height= int(60.*fig.get_figheight()),
LookupError: 'base64' is not a text encoding; use codecs.encode() to handle arbitrary codecs
@aflyax Are you sure you're using the master version ? You code line 155 seems to be different than 4b945fd's code...
Hi @eilamgbrz - I just uploaded to PyPI the latest version containing the fix for this issue. You can either use master on the repo or upgrade to the latest version.
Can you give that a try and let us know if that fixes it?
Thanks for taking a look too, @BibMartin
Works fine for me.
Hi. I've recently downloaded the package and have been messing around with some basic examples.
The following snippet runs without error,
but changing
mplleaflet.show()
tomplleaflet.display()
returns the following errorI'm running Python 3.4.3, iPython 4.0.0 through Jupyter 4.0.6, matplotlib 1.4.3 and mplleaflet 0.0.4. OS is Win8.1 (64bit).
Cheers, Eilam