Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loading failed for ... ipysheet@~0.5.0/dist/index.js #208

Open
MarcSkovMadsen opened this issue Aug 18, 2021 · 6 comments
Open

Loading failed for ... ipysheet@~0.5.0/dist/index.js #208

MarcSkovMadsen opened this issue Aug 18, 2021 · 6 comments

Comments

@MarcSkovMadsen
Copy link

MarcSkovMadsen commented Aug 18, 2021

With Panel==0.12.1, ipywidgets_bokeh==1.0.2, ipykernel==5.5.5 and Ipysheet==0.5.0 when I try to run the below script I get a

Loading failed for the <script> with source “https://unpkg.com/ipysheet@~0.5.0/dist/index.js”.

image

Serve the below with panel serve name_of_script.py

import panel as pn
import ipywidgets as ipw
import ipysheet

pn.extension("ipywidgets", sizing_mode="stretch_width")

accent_base_color = "#2F4F4F"
template = pn.template.FastListTemplate(
    site="Awesome Panel",
    title="IPySheet",
    accent_base_color=accent_base_color,
    header_background=accent_base_color,
    header_accent_base_color="white",
)
theme = "dark" if template.theme == pn.template.DarkTheme else "default"


def get_widget(theme="default", accent_base_color="blue"):
    slider = pn.widgets.FloatSlider(value=10, start=0, end=100)
    sheet = ipysheet.sheet()

    ipysheet.cell(1,1, "Input")
    cell3 = ipysheet.cell(1,2, 42.)
    ipysheet.cell(2,1, "Output")
    cell_sum = ipysheet.cell(2,2, 52., read_only=True, background_color=accent_base_color)

    @pn.depends(slider, cell3, watch=True)
    def calculate(a,b):
        cell_sum.value = a+b
        print("update", cell_sum.value)

    return pn.Column(slider, sheet)

widget = get_widget(theme=theme, accent_base_color=accent_base_color)
component = pn.panel(widget, height=500, sizing_mode="stretch_both")
template.main.append(component)
template.servable()
@MarcSkovMadsen
Copy link
Author

Works with Ipysheet 0.4.4

ipysheet.works.mp4

@nunupeke
Copy link

Same here for voila==0.2.10. Works fine in jupyterlab and notebook though.

@gbrault
Copy link

gbrault commented Sep 25, 2021

Loading widget...
works in Jupyterlab but not in voilà
JupyterLab v3.1.13
/home/ubuntu/venv/share/jupyter/labextensions
jupyterlab-plotly v5.3.1 enabled OK
ipysheet v0.5.0 enabled OK (python, ipysheet)
@jupyterlab/server-proxy v3.1.0 enabled OK
@jupyter-widgets/jupyterlab-manager v3.0.1 enabled OK (python, jupyterlab_widgets)
@voila-dashboards/jupyterlab-preview v2.0.6 enabled OK (python, voila)

@philippjfr
Copy link

Definitely an issue since this is where the @jupyter-widgets/html-manager tries to fetch the package from CDN:

https://github.com/jupyter-widgets/ipywidgets/blob/master/packages/html-manager/src/libembed-amd.ts#L48

@giswqs
Copy link
Contributor

giswqs commented Feb 3, 2022

Any update on this? It would be awesome to make ipysheet compatible with Google Colab googlecolab/colabtools#2594

@DonJayamanne
Copy link

DonJayamanne commented Jun 20, 2022

Running into the same problem in VS Code, looks like the files pushed into CDN for 0.5.0 are JS modules, where as the preivous version used requirejs and included everything in the artifacts published to the CDN.

Is this an oversight os is this deliberate? I.e. should the consumers of this file on the CDN change how these files are now consumed/loaded? Not sure that will work though as there are quite a lot of missing packages (handson tables and the like)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants