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

Examples do not work in the jupyter notebook #7

Closed
lbignone opened this issue Jul 19, 2017 · 4 comments
Closed

Examples do not work in the jupyter notebook #7

lbignone opened this issue Jul 19, 2017 · 4 comments
Labels

Comments

@lbignone
Copy link

Very interesting mini module. Thank you for this.

Examples do not appear to work in the jupyter notebook. I had no problem executing them in the ipython shell

Here is the traceback (Jupyter 5.0.0, python 3.6.1, ipython 5.3.0):

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/usr/lib/python3.6/site-packages/IPython/core/formatters.py in __call__(self, obj)
    305                 pass
    306             else:
--> 307                 return printer(obj)
    308             # Finally look for special method names
    309             method = get_real_method(obj, self.print_method)

/usr/lib/python3.6/site-packages/IPython/core/pylabtools.py in <lambda>(fig)
    238 
    239     if 'png' in formats:
--> 240         png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png', **kwargs))
    241     if 'retina' in formats or 'png2x' in formats:
    242         png_formatter.for_type(Figure, lambda fig: retina_figure(fig, **kwargs))

/usr/lib/python3.6/site-packages/IPython/core/pylabtools.py in print_figure(fig, fmt, bbox_inches, **kwargs)
    122 
    123     bytes_io = BytesIO()
--> 124     fig.canvas.print_figure(bytes_io, **kw)
    125     data = bytes_io.getvalue()
    126     if fmt == 'svg':

/usr/lib/python3.6/site-packages/matplotlib/backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, **kwargs)
   2208                 bbox_filtered = []
   2209                 for a in bbox_artists:
-> 2210                     bbox = a.get_window_extent(renderer)
   2211                     if a.get_clip_on():
   2212                         clip_box = a.get_clip_box()

/usr/lib/python3.6/site-packages/matplotlib/image.py in get_window_extent(self, renderer)
    755 
    756     def get_window_extent(self, renderer=None):
--> 757         x0, x1, y0, y1 = self._extent
    758         bbox = Bbox.from_extents([x0, y0, x1, y1])
    759         return bbox.transformed(self.axes.transData)

TypeError: 'NoneType' object is not iterable
@astrofrog
Copy link
Owner

@lbignone - thanks for the report, I hadn't tested it yet in the notebook. Can you provide the code you used to get the above traceback?

@astrofrog
Copy link
Owner

@lbignone - I found the issue and am fixing it in #8

@astrofrog
Copy link
Owner

@lbignone - I've merged the fix and released v0.2. Can you confirm that this is now fixed for you?

@lbignone
Copy link
Author

I can confirm all examples in the README work in my notebook

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

No branches or pull requests

2 participants