diff --git a/extensions/positron-python/pythonFiles/positron/positron_ipykernel/plots.py b/extensions/positron-python/pythonFiles/positron/positron_ipykernel/plots.py index 3000ddc3d6a..6ab50a273b0 100644 --- a/extensions/positron-python/pythonFiles/positron/positron_ipykernel/plots.py +++ b/extensions/positron-python/pythonFiles/positron/positron_ipykernel/plots.py @@ -98,12 +98,12 @@ def handle_msg(self, msg: CommMessage[PlotBackendMessageContent], raw_msg: JsonR pixel_ratio = request.params.pixel_ratio or 1.0 if width_px != 0 and height_px != 0: - format_dict, md_dict = self._resize_pickled_figure( + format_dict = self._resize_pickled_figure( pickled, width_px, height_px, pixel_ratio ) data = format_dict["image/png"] output = PlotResult(data=data, mime_type="image/png").dict() - figure_comm.send_result(data=output, metadata=md_dict) + figure_comm.send_result(data=output, metadata={"mime_type": "image/png"}) else: logger.warning(f"Unhandled request: {request}") @@ -213,7 +213,7 @@ def _resize_pickled_figure( if was_interactive: plt.ion() - return (format_dict, {}) + return format_dict def _is_figure_empty(self, figure): children = figure.get_children()