solara icon indicating copy to clipboard operation
solara copied to clipboard

Altair and other JS extensions do not work in Voila or Colab

Open maartenbreddels opened this issue 2 years ago • 4 comments

In https://github.com/widgetti/solara/blob/master/solara/widgets/vue/vegalite.vue we assume the /_solara/_cdn/ endpoint can be reached. This endpoint exists in notebook, lab and solara server, but not in Voila (except when running as a voila extension in jupyter server) or colab.

A workaround for now is to manually set the solara_cdn javascript variable.

import IPython.display
# make solara use a real cdn, since the solara cdn proxy is not available
display(IPython.display.Javascript("solara_cdn = 'https://cdn.jsdelivr.net/npm/'"))

maartenbreddels avatar Jan 29 '24 12:01 maartenbreddels

Found this our while writing a test for https://github.com/widgetti/solara/pull/479

maartenbreddels avatar Jan 29 '24 12:01 maartenbreddels

Altair should work now due to #487, other js libraries not yet

maartenbreddels avatar Jan 31 '24 08:01 maartenbreddels

For me Altair also doesnt work in notebooks

404 GET /_solara/cdn/[email protected]/require.js

Jhsmit avatar Feb 05 '24 10:02 Jhsmit

Should be fixed due to #479

Keeping this open till we fix this for the other libraries.

maartenbreddels avatar Feb 28 '24 11:02 maartenbreddels

Fixed in #763 (Solara 1.39.0)

maartenbreddels avatar Aug 30 '24 15:08 maartenbreddels