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

Error display widget #183

Closed
RobinDavid opened this issue Mar 28, 2018 · 7 comments
Closed

Error display widget #183

RobinDavid opened this issue Mar 28, 2018 · 7 comments

Comments

@RobinDavid
Copy link

RobinDavid commented Mar 28, 2018

Environment

  • Operating System: Linux Debian testing

  • Python Version: '3.6.5rc1 (default, Mar 14 2018, 06:54:23) \n[GCC 7.3.0]'

  • How did you install Qgrid: pip3

  • Python packages:
    qgrid==1.0.2
    notebook==5.4.1
    jupyterlab==0.31.12
    jupyterlab-iframe==0.0.2
    jupyterlab-launcher==0.10.5
    jupyterlab-widgets==0.6.15

  • Jupyter lab packages (if applicable): $ jupyter labextension list

JupyterLab v0.31.12
Known labextensions:
   app dir: /usr/local/share/jupyter/lab
@jupyter-widgets/jupyterlab-manager
        @jupyter-widgets/jupyterlab-manager v0.33.2  enabled  OK
jupyter-threejs
        jupyter-threejs v1.0.0  enabled  OK
jupyterlab-datawidgets
        jupyterlab-datawidgets v5.0.1  enabled  OK
jupyterlab_iframe
        jupyterlab_iframe v0.1.0  enabled  OK
qgrid
        qgrid v1.0.2  enabled  OK

Description of Issue

The error is that qgrid rendering does not work. Instead of obtaining the table it just yield "Error displaying widget". The following warning occurs when performing jupyter labextension install qgrid:

WARNING in ./~/qgrid/src/qgrid.widget.js
Module not found: Error: Can't resolve 'base/js/dialog' in '/usr/local/share/jupyter/lab/staging/node_modules/qgrid/src'
@ ./~/qgrid/src/qgrid.widget.js 12:11-36
@ ./~/qgrid/src/index.js
@ ./~/qgrid/src/jupyterlab-plugin.js
@ ./build/index.out.js
@ multi whatwg-fetch ./build/index.out.js

Once installed and enabled I can obtain the same warning with jupyter lab build. I have no idea were this issue might come from. I have also tried disabling all the other extensions but that did not changed anything.. Buy the way it still works fine with jupyter notebook so I think its linked to the way extension are handled and "packed" by jupyterlab.

Reproduction Steps

  1. Setup the exact same version given above (I guess)
  2. try jupyterlab labextension install qgrid

Anything else?

The full output of jupyter labextension install qgrid is the following:

$ sudo jupyter labextension install qgrid                              
> /usr/bin/npm pack qgrid
qgrid-1.0.2.tgz
> node /usr/local/lib/python3.6/dist-packages/jupyterlab/staging/yarn.js install
yarn install v1.3.2
info No lockfile found.
[1/4] Resolving packages...
[2/4] Fetching packages...
info fsevents@1.1.3: The platform "linux" is incompatible with this module.
info "fsevents@1.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "@jupyterlab/json-extension > react-highlighter@0.4.2" has unmet peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.0".
warning "@jupyterlab/json-extension > react-json-tree@0.10.9" has unmet peer dependency "react@^15.0.0".
warning "@jupyterlab/json-extension > react-json-tree@0.10.9" has unmet peer dependency "react-dom@^15.0.0".
warning "@jupyterlab/vdom-extension > @nteract/transform-vdom@1.1.1" has unmet peer dependency "react@^15.6.1".
[4/4] Building fresh packages...
[1/2] ⠄ spawn-sync
[2/2] ⠄ canvas
[-/2] ⠄ waiting...
[-/2] ⠄ waiting...
success Saved lockfile.
Done in 42.85s.
> node /usr/local/lib/python3.6/dist-packages/jupyterlab/staging/yarn.js run build:prod
yarn run v1.3.2
$ webpack --config webpack.prod.config.js
Hash: 7cae16c2c6fc360ac782
Version: webpack 2.7.0
Time: 35998ms
                                 Asset       Size  Chunks                    Chunk Names
  00dd0ec0a16a1085e714c7906ff8fb06.png    7.07 kB          [emitted]         
  d104fcf119d40c51554ddb8b377142e5.gif  833 bytes          [emitted]         
  3e4484ea8db10af1320808c8477346ea.gif  836 bytes          [emitted]         
  2352874b5f636ca331fe9509a2f9bdd7.gif  830 bytes          [emitted]         
  912ec66d7572ff821749319396470bde.svg     444 kB          [emitted]  [big]  
  b06871f281fee6b241d60582ae9369b9.ttf     166 kB          [emitted]         
  d10bc07005bb2d604f4905183690ac04.png    7.01 kB          [emitted]         
  093a819138276b446611d1d2a45b98a2.png    4.63 kB          [emitted]         
  6ccc1ed85229f7c88b07bbbeefe5214d.gif  846 bytes          [emitted]         
  674f50d287a8c48dc19ba404d20fe713.eot     166 kB          [emitted]         
  ea4ebe072be75fbbea002631916836de.png    6.31 kB          [emitted]         
  40bf25799e4fec8079c7775083de09df.png    7.01 kB          [emitted]         
  4e7e3e142f3939883cd0a7e00cabdaef.png    4.68 kB          [emitted]         
 fee66e712a8a08eef5805a46892932ad.woff      98 kB          [emitted]         
af7ae505a9eed503f8b8e6982036873e.woff2    77.2 kB          [emitted]         
  b2c868bfc2cab12122861c8214e38724.gif  851 bytes          [emitted]         
  a92d8f6c106943995720f2884634670e.gif  823 bytes          [emitted]         
             0.780ca6ca65ebac4f7bba.js     135 kB       0  [emitted]         @jupyter-widgets/controls
             1.aa914350d557d71bc979.js     602 kB       1  [emitted]  [big]  vega2
             2.2fdf50f4cb288ddada35.js     458 kB       2  [emitted]  [big]  
          main.76cfbd9417a5abf916e4.js    3.03 MB       3  [emitted]  [big]  main
        vendor.c4e1533d71c9e6619b5b.js    1.58 MB       4  [emitted]  [big]  vendor
      manifest.ba62115a37ebc855c06b.js    1.67 kB       5  [emitted]         manifest
         0.780ca6ca65ebac4f7bba.js.map     446 kB       0  [emitted]         @jupyter-widgets/controls
         1.aa914350d557d71bc979.js.map    2.23 MB       1  [emitted]         vega2
         2.2fdf50f4cb288ddada35.js.map    1.34 MB       2  [emitted]         
      main.76cfbd9417a5abf916e4.js.map    9.54 MB       3  [emitted]         main
    vendor.c4e1533d71c9e6619b5b.js.map    5.72 MB       4  [emitted]         vendor
  manifest.ba62115a37ebc855c06b.js.map    8.34 kB       5  [emitted]         manifest
                            index.html    1.53 kB          [emitted]         
[+HaM] ./~/@phosphor/messaging/lib/index.js 18.5 kB {4} [built]
[/sZe] ./~/@phosphor/commands/lib/index.js 33.2 kB {4} [built]
[2Kj9] ./~/@phosphor/widgets/lib/index.js 1.34 kB {4} [built]
[6nap] ./~/ajv/lib/ajv.js 15.2 kB {4} [built]
[8U58] ./~/codemirror/lib/codemirror.js 352 kB {4} [built]
[Js9g] ./build/index.out.js 38.4 kB {3} [built]
[Vszx] ./~/@phosphor/domutils/lib/index.js 636 bytes {4} [built]
[b/Hx] ./~/ansi_up/ansi_up.js 11 kB {4} [built]
[q1RZ] ./~/@phosphor/datagrid/lib/index.js 793 bytes {4} [built]
[qzHn] ./~/@phosphor/coreutils/lib/index.js 721 bytes {4} [built]
[rplX] ./~/whatwg-fetch/fetch.js 12.7 kB {3} [built]
[wr2+] ./~/@phosphor/properties/lib/index.js 6.58 kB {4} [built]
[wuIn] ./~/comment-json/index.js 103 bytes {4} [built]
   [6] multi @phosphor/algorithm @phosphor/application @phosphor/commands @phosphor/coreutils @phosphor/datagrid @phosphor/disposable @phosphor/domutils @phosphor/dragdrop @phosphor/messaging @phosphor/properties @phosphor/signaling @phosphor/virtualdom @phosphor/widgets ajv ansi_up codemirror comment-json es6-promise marked moment path-posix react react-dom sanitize-html url-parse xterm 328 bytes {4} [built]
   [7] multi whatwg-fetch ./build/index.out.js 40 bytes {3} [built]
    + 1891 hidden modules

WARNING in ./~/qgrid/src/qgrid.widget.js
Module not found: Error: Can't resolve 'base/js/dialog' in '/usr/local/share/jupyter/lab/staging/node_modules/qgrid/src'
 @ ./~/qgrid/src/qgrid.widget.js 12:11-36
 @ ./~/qgrid/src/index.js
 @ ./~/qgrid/src/jupyterlab-plugin.js
 @ ./build/index.out.js
 @ multi whatwg-fetch ./build/index.out.js
Child html-webpack-plugin for "index.html":
    [3IRH] (webpack)/buildin/module.js 517 bytes {0} [built]
    [DuR2] (webpack)/buildin/global.js 509 bytes {0} [built]
    [GTAU] ./~/html-loader!./templates/partial.html 420 bytes {0} [built]
    [M4fF] ./~/lodash/lodash.js 540 kB {0} [built]
    [vxCX] ./~/html-webpack-plugin/lib/loader.js!./templates/template.html 1.41 kB {0} [built]
Done in 37.00s.
@rausm
Copy link

rausm commented Apr 3, 2018

Same error for [Anaconda] Python 3.6 x64 under Win7 (qgrid 1.0.2 installed through conda)

@TimShawver
Copy link
Contributor

Sorry about the delay in responding, haven't had time to work on qgrid in a while. Did either of you try using an older version of Jupyterlab by any chance? Wondering if maybe this is an issue with the new version of Jupyterlab (0.31.x) that didn't exist in the old version (0.30.x). That's my best guess at this point...I should have some time this weekend to try it out myself.

@TimShawver
Copy link
Contributor

Hmm actually qgrid appears to be working fine in the binder environment, which is now running 0.31.5, so I doubt this is a new compatibility issue with 0.31.x. I'll have to think about this some more.

FWIW the most common issue is a version mismatch between the python package version and the jupyterlab package version (see #177 and #180). That does not appear to be the case for @RobinDavid though based on looking at the installed package list. Just mentioning it in case it helps other people.

@rausm
Copy link

rausm commented Apr 19, 2018

@TimShawver I erred too. I got here by googling the error message, and (I don't really remember) hadn't noticed the issue title or assumed that qgrid wouldn't work (it was a bitch to get working in plain jupyter a while back. I think i only got it working once, then updated and poof ;-).

Although I got the warning, qgrid worked well. So the warning is probably not the problem, @RobinDavid might try re-running the registration commands.

@TimShawver
Copy link
Contributor

Ah yea, that warning is expected actually...it doesn't mean anything is wrong. I should figure out how to get rid of it but haven't had time.

@RobinDavid
Copy link
Author

Hi @TimShawver ! Thank you for your answer. I tried again updating all packages and it now works. I don't know exactly what made it work but here is what I have done:

  • updating jupyterlab from 0.31.12 to 0.32.0
  • updating Yarn from 1.3.1 to 1.5.1
  • reinstalling all my labextensions (including qgrid)
  • performing jupyterlab labextension clean as the qgrid installation "kind of" succeed it seems to leave staging files in the application directory ~/.local/share/jupyter/lab anyway.

I am now delighted to use qgrid in jupyterlab 😄

(the issue is ready to be closed I guess)

@TimShawver
Copy link
Contributor

Great to hear, thanks for following up @RobinDavid

ankostis added a commit to ankostis/qgrid that referenced this issue Aug 29, 2019
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

3 participants