TypeError Traceback (most recent call last) D:\Anaconda\lib\site-packages\IPython\core\formatters.py in __call__(self, obj) 339 pass 340 else: --> 341 return printer(obj) 342 # Finally look for special method names 343 method = get_real_method(obj, self.print_method) D:\Anaconda\lib\site-packages\IPython\core\pylabtools.py in <lambda>(fig) 239 240 if 'png' in formats: --> 241 png_formatter.for_type(Figure, lambda fig: print_figure(fig, 'png', **kwargs)) 242 if 'retina' in formats or 'png2x' in formats: 243 png_formatter.for_type(Figure, lambda fig: retina_figure(fig, **kwargs)) D:\Anaconda\lib\site-packages\IPython\core\pylabtools.py in print_figure(fig, fmt, bbox_inches, **kwargs) 123 124 bytes_io = BytesIO() --> 125 fig.canvas.print_figure(bytes_io, **kw) 126 data = bytes_io.getvalue() 127 if fmt == 'svg': D:\Anaconda\lib\site-packages\matplotlib\backend_bases.py in print_figure(self, filename, dpi, facecolor, edgecolor, orientation, format, bbox_inches, pad_inches, bbox_extra_artists, backend, **kwargs) 2293 ) 2294 with getattr(renderer, "_draw_disabled", nullcontext)(): -> 2295 self.figure.draw(renderer) 2296 2297 if bbox_inches: D:\Anaconda\lib\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer, *args, **kwargs) 72 @wraps(draw) 73 def draw_wrapper(artist, renderer, *args, **kwargs): ---> 74 result = draw(artist, renderer, *args, **kwargs) 75 if renderer._rasterizing: 76 renderer.stop_rasterizing() D:\Anaconda\lib\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer) 49 renderer.start_filter() 50 ---> 51 return draw(artist, renderer) 52 finally: 53 if artist.get_agg_filter() is not None: D:\Anaconda\lib\site-packages\matplotlib\figure.py in draw(self, renderer) 2844 self.patch.draw(renderer) 2845 mimage._draw_list_compositing_images( -> 2846 renderer, self, artists, self.suppressComposite) 2847 2848 for sfig in self.subfigs: D:\Anaconda\lib\site-packages\matplotlib\image.py in _draw_list_compositing_images(renderer, parent, artists, suppress_composite) 130 if not_composite or not has_images: 131 for a in artists: --> 132 a.draw(renderer) 133 else: 134 # Composite any adjacent images together D:\Anaconda\lib\site-packages\matplotlib\artist.py in draw_wrapper(artist, renderer) 49 renderer.start_filter() 50 ---> 51 return draw(artist, renderer) 52 finally: 53 if artist.get_agg_filter() is not None: D:\Anaconda\lib\site-packages\cartopy\mpl\geoaxes.py in draw(self, renderer, inframe) 386 387 return matplotlib.axes.Axes.draw(self, renderer=renderer, --> 388 inframe=inframe) 389 390 def __str__(self):
求解答,谢谢大家!