thomasballinger / observable-jupyter

Embed visualizations and code from Observable notebooks in Jupyter
https://observable-jupyter.readthedocs.io/
ISC License
56 stars 10 forks source link

error with embedded notebooks #17

Closed cornhundred closed 2 years ago

cornhundred commented 2 years ago

I'm seeing an error in the embeds of Observable visualizations in previously run Jupyter notebooks that says @variable is not defined. This appears to have just started to happen today and can be reproduced in some of the examples from the demo Google Colab notebook from this repo:

Here's an example

import this
text = ''.join(this.d.get(l, l) for l in this.s)
embed('@ballingt/word-cloud-example', cells=['chart'], inputs={'source': text})
chart = RuntimeError: @variable is not defined

Also, here's a screenshot

Screen Shot 2022-09-20 at 6 31 06 PM

It is interesting since the first gear embedding is working and the visuals from the embedded Observable notebooks are working properly

cornhundred commented 2 years ago

This error is being caused by an update to the ObservableHQ API and is related to this issue https://github.com/observablehq/runtime/issues/342

They should be introducing a fix soon https://talk.observablehq.com/t/error-with-observable-jupyter-embeds/7052/2

cornhundred commented 2 years ago

Thanks for the new release of observable-jupyter 0.1.14!

I can confirm that it is working on Google Colab.

I'll plan on closing this issue once ObservableHQ updates their API just to make sure we can confirm retroactive compatibility. Feel free to close if you feel this is outside the scope of the library.

cornhundred commented 2 years ago

The issue has been fixed for old embeds by ObservableHQ https://talk.observablehq.com/t/error-with-observable-jupyter-embeds/7052/7