### Bug description

I'm following the tutorial [here](https://quarto.org/docs/get-started/computations/vscode.html#overview).

Using the following `computations.qmd` code example, the matplotlib image is rendered okay, but the plotly image does not get rendered in the preview both in visual studio code and in the browser:
````
---
title: Quarto Computations
jupyter: python3
---

## NumPy

```{python}
import numpy as np
a = np.arange(15).reshape(3, 5)
a
```

## Matplotlib

```{python}
import matplotlib.pyplot as plt

fig = plt.figure()
x = np.arange(10)
y = 2.5 * np.sin(x / 20 * np.pi)
yerr = np.linspace(0.05, 0.2, 10)

plt.errorbar(x, y + 3, yerr=yerr, label='both limits (default)')
plt.errorbar(x, y + 2, yerr=yerr, uplims=True, label='uplims=True')
plt.errorbar(x, y + 1, yerr=yerr, uplims=True, lolims=True,
             label='uplims=True, lolims=True')

upperlimits = [True, False] * 5
lowerlimits = [False, True] * 5
plt.errorbar(x, y, yerr=yerr, uplims=upperlimits, lolims=lowerlimits,
             label='subsets of uplims and lolims')

plt.legend(loc='lower right')
plt.show(fig)
```

## Plotly

```{python}
import plotly.express as px
import plotly.io as pio
gapminder = px.data.gapminder()
gapminder2007 = gapminder.query("year == 2007")
fig = px.scatter(gapminder2007, 
                 x="gdpPercap", y="lifeExp", color="continent", 
                 size="pop", size_max=60,
                 hover_name="country")
fig.show()
```
````
I can execute the plotly cell and see the correct cell output in visual studio code, but when I try to preview it, either inside visual studio code or in a web browser, the plotly output is not rendered.

In the browser's devtools console, I see the following error:
```
Uncaught TypeError: Cannot read properties of undefined (reading 'newPlot')
    at computations.html:268:436
    at Object.execCb (require.min.js:1:16727)
    at e.check (require.min.js:1:10499)
    at e.<anonymous> (require.min.js:1:12915)
    at require.min.js:1:1542
    at require.min.js:1:13376
    at each (require.min.js:1:1020)
    at e.emit (require.min.js:1:13344)
    at e.check (require.min.js:1:11058)
    at e.enable (require.min.js:1:13242)
```

I am usring quarto 1.2.313 running on Ubuntu 22.04 on WSL2.

### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [ ] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
2023-01-19T13:31:52Z
aaronsgithub
bug third-party
closed
plotly cell output is not being rendered
https://github.com/quarto-dev/quarto-cli/issues/4018