Hi All;

I tried to take Quarto for whirl using Python 3. I use macOS Monetery with Python 3.10.

 I rendered the published example
```
title: "matplotlib demo"
format:
  html:
    code-fold: true
jupyter: python3
---

For a demonstration of a line plot on a polar axis, see @fig-polar.

```{python}
#| label: fig-polar
#| fig-cap: "A line plot on a polar axis"

import numpy as np
import matplotlib.pyplot as plt

r = np.arange(0, 2, 0.01)
theta = 2 * np.pi * r
fig, ax = plt.subplots(
  subplot_kw = {'projection': 'polar'} 
)
ax.plot(theta, r)
ax.set_rticks([0.5, 1, 1.5, 2])
ax.grid(True)
plt.show()
```




 I keep getting this error. 

```
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
/var/folders/7p/cp6pcdns68zfy1p7bchrfs4h0000gn/T/ipykernel_52212/1634554178.py in <module>
     13 ax.set_rticks([0.5, 1, 1.5, 2])
     14 ax.grid(True)
---> 15 plt.show()

/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/matplotlib/pyplot.py in show(*args, **kwargs)
    366     """
    367     _warn_if_gui_out_of_main_thread()
--> 368     return _backend_mod.show(*args, **kwargs)
    369
    370

/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/itermplot/__init__.py in show()
    138     figmanager = Gcf.get_active()
    139     if figmanager is not None:
--> 140         figmanager.show()
    141     else:
    142         for manager in Gcf.get_all_fig_managers():

/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/itermplot/__init__.py in show(self)
    296
    297         if hasattr(data, "getbuffer"):
--> 298             imgcat(data.getbuffer(), fn)
    299         else:  # Python 2
    300             imgcat(data.getvalue(), fn)

/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/itermplot/__init__.py in imgcat(data, fn)
    122         sys.stdout.buffer.write(buf)
    123     else:
--> 124         sys.stdout.write(buf)
    125     sys.stdout.flush()
    126

/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/ipykernel/iostream.py in write(self, string)
    509
    510         if not isinstance(string, str):
--> 511             raise TypeError(
    512                 f"write() argument must be str, not {type(string)}"
    513             )

TypeError: write() argument must be str, not <class 'bytes'>
TypeError: write() argument must be str, not <class 'bytes'>
```

It works well with R and Julia. This error appears only when trying `plt.show()`. Thanks!! 
2022-04-02T05:23:35Z
Mutaz94
closed
Unable to render with including `plt.show()`
https://github.com/quarto-dev/quarto-cli/issues/502