Skip to content

404 errors when using voila #312

Open

Description

@DarinJ

OS: Centos
Version Python 3.7.6
Relevant packages:
jupyter==1.0.0
jupyter-client==5.3.4
jupyter-console==6.1.0
jupyter-core==4.6.1
jupyter-server==0.1.1
jupyter-telemetry==0.1.0
jupyterhub==1.1.0
jupyterlab==1.2.6
jupyterlab-pygments==0.1.1
jupyterlab-server==1.0.6
qgrid==1.3.1
voila==0.1.21
widgetsnbextension==3.5.1

Description of Issue

The following code runs fine in a jupyter notebook, but fails when using Voila, and gives several 404 errors listed below.

from ipywidgets import widgets
import pandas as pd
import qgrid
df=pd.DataFrame([[1,2,3],[2,3,4]], columns=['1','2','4'])
qg=qgrid.QGridWidget(df=df)
display(qg)

Errors (From Chrome JS console):

Starting WebSocket: ws://192.168.102.11:8000/user/darin/api/kernels/7e5e3d8f-3812-4906-8ec6-1024bdff2c5d
default.js:1452 Kernel: connected (7e5e3d8f-3812-4906-8ec6-1024bdff2c5d)
:8000/user/darin/voila/qgrid.js:1 Failed to load resource: the server responded with a status of 404 (Not Found)
loader.js:78 Falling back to https://unpkg.com/ for qgrid@^1.1.3
unpkg.com/qgrid@%5E1.1.3/dist/index.js:1 Failed to load resource: the server responded with a status of 404 ()
manager-base.js:273 Could not instantiate widget
(anonymous) @ manager-base.js:273
3require.min.js:1 Uncaught (in promise) Error: Script error for "qgrid"
http://requirejs.org/docs/errors.html#scripterror
    at makeError (require.min.js:1)
    at HTMLScriptElement.onScriptError (require.min.js:1)
  • What did you expect to happen?
    A beautifully displayed dataframe to appear in my webapp
  • What happened instead?
    A bank page, with several 404 errors in the javascript console, in the process learned the the latest version of qgrid on unpkg.com is 1.1.1.

Reproduction Steps

  1. pip install qgrid
  2. paste code listed above
  3. press voila button

I looked through the other issues, it seems like others have had similar issues, I have yet to find a fix.

qgrid and voila are pretty awesome I'm hoping to get them working together.

Activity

  1. danielfrg commented on Jun 9, 2020

    @danielfrg

    I can reproduce this. Pasting a screenshot of the errors in the console log.

    Screen Shot 2020-06-08 at 19 40 21

    As mentioned by Darin the issue is to be that the widget module name is pointing to qgrid but I think newer versions have been pushed to qgrid2.

    Maybe just changing this line will fix it: https://github.com/quantopian/qgrid/blob/master/js/src/qgrid.widget.js#L37

    I will make a PR to see if there are more places where this needs to be fixed.

  2. astrojuanlu commented on Dec 17, 2020

    @astrojuanlu

    This is still present. There are a few qgrid <-> voilà issues and I'm not sure which one is the most up to date.

  3. samiit commented on Mar 11, 2021

    @samiit

    Hi everyone,

    Is there any progress on this? Is there a workaround for serving the notebook via voila?
    I don't understand completely the solution suggested by @danielfrg ! Where should I update to qgrid2, and what is it?

    Many thanks,
    Sam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions