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

Will Qgrid be updated to work with Jupyterlab 3.0? #350

Open
JohnOmernik opened this issue Jan 10, 2021 · 22 comments
Open

Will Qgrid be updated to work with Jupyterlab 3.0? #350

JohnOmernik opened this issue Jan 10, 2021 · 22 comments

Comments

@JohnOmernik
Copy link

Just interested if there will be work to have this work with Jupyterlab 3.0

@ogencoglu
Copy link

Any updates here?

@ericbdaniels
Copy link

Hi All,

I'm a bit new to this and haven't worked much with Jupyter widgets (or JS at all for that matter) - but I've updated the qgrid extension to work for jupyter lab 3. Runs fine locally (on windows), currently failing the Ubuntu checks on pull request. : #354

Any input/assistance appreciated.

Also, is this still maintained by Quantopian?
Just curious as I see Quantopian is now part of robinhood, per wikipedia: https://en.wikipedia.org/wiki/Quantopian

@j123github
Copy link

I have made the required changes to get qgrid working on JupyterLab 3. I removed completely the full screen functionality as I wasn't sure how to get it to work. I deployed the package at https://www.npmjs.com/package/@j123npm/qgrid2 and it can be installed using

jupyter labextension install @j123npm/[email protected]

and have confirmed it works with qgrid version 1.3.1

I've done a pull request #356 but it may not be accepted because I hack the removal of the full screen functionality.

ianabc pushed a commit to callysto/docker-stacks that referenced this issue Mar 9, 2021
@TrentBrown
Copy link

Thanks for the fix, j123github!

Was pulling my hair out trying to get my build to work again. Reviewed and approved your pull request, FWIW. Hope someone can merge it soon.

@pierrot6754
Copy link

Thanks for the fix, j123github! It works well.

@info-rchitect
Copy link

Thanks for the fix, any timeline on the merge? qgrid is in heavy use in my app :)

@brunakov
Copy link

appreciate your fix @j123github !

@michael4tasman
Copy link

There haven't been any commits to qgrid since April. Is the project being maintained, or has it been abandoned?

@info-rchitect
Copy link

info-rchitect commented Sep 29, 2021

@michael4tasman I wonder the same thing. I floated the idea of having it be a default ipywidgets and the support concern came up. There really is nothing out here with the scalability of qgrid that I have seen so far. For data scientists this is a must have feature for any widget ecosystem.

@JohnOmernik
Copy link
Author

I have cloned qgrid and spent a day learning it well enough to work with an up-to-date Jupyterlab. I prebuilt the extension and it seems to be working. I am not an expert JS coder, and more of a hacker, but I got it working. If we move over here, we could start maybe cleaning up some of the bugs in the code, but I will need other coders to help!

https://github.com/JohnOmernik/qgrid

@J-Sallis
Copy link

J-Sallis commented Nov 3, 2021

Folks - what is the best way to get this working for jupL 3.0

John’s clone or j123’s solution?

@GaryScottMartin
Copy link

GaryScottMartin commented Nov 9, 2021

I was able to get both j123's fix and JohnOmernik's to work after deleting my Anaconda environments on both Windows and ArchLinux. On Windows, I was using a new Miniconda distribution for a short time but deleted that after I got Jupyter Lab running directly under ArchLinux on the Windows Subsystem for Linux (WSL). I have the same Conda-free configuration running properly directly under the ArchLinux OS (this computer is set up for dual boot of Windows and ArchLinux).

Neither is working for me at the moment. j123's fix was working for me until I had an issue trying to upgrade Python in Anaconda, I uninstalled Anaconda and installed the latest Miniconda, Now I can't get j123's solution to work or John's clone. From j123's I get the missing widget error message. From John's clone, I get an attribute error that qgrid2 doesn't have a show_grid attribute.

@JohnOmernik
Copy link
Author

JohnOmernik commented Nov 9, 2021 via email

@bklippstein
Copy link

Jupyterlab is working even on my windows laptop now, with j123's fix and jupyterlab 3!
pip install qgrid==1.3.1
jupyter labextension update --all
jupyter labextension install @j123npm/[email protected]
jupyterlab is version 3.2.1 on the Windows machine, Anaconda install.

Thank you j123github!! Qgrid is very important for my workflow.

@tmeyier
Copy link

tmeyier commented Nov 30, 2021

J123's patch is working for me too: both on a fresh conda environment following the instructions of bklippstein.
I see three issues with qgrid however:

  • the filter popup widgets are transparent both visibly and also don't react properly to mouse action to a certain extent
  • when I create a horizontal scrollbar with qgrid.show_grid(enron_data, grid_options={'forceFitColumns': false}) the last row of the table isn't displayed fully
  • when there are two identically named columns, qgrid displays only the second one
    I'm not sure if these issues are specific to the patch as I've only just started to use qgrid

@stefaneidelloth
Copy link

stefaneidelloth commented Dec 22, 2021

a) With J123's patch, JupyterLab 3.2.5 on Windows 10, installation of qgrid===1.31 with pip and node v17.0.0 (don't know if relevant) I get:
Error displaying widget: model not found
Browser console shows the error message
TypeError: n is not a function

b) After pip uninstall qgrid==1.3.1 and following installation instructions from
https://github.com/JohnOmernik/qgrid

I get:
Error displaying widget
PitterPatterPython/qgrid#3

Edit:
Works now with a fresh install. Issue has been due to another jupyterlab extension.

@bklippstein
Copy link

Did you try the installation via Anaconda? See my post above. It's working on Win10 for me.

@bklippstein
Copy link

I have been using qgrid for years. It was always try and error to get it work, and it was always 'Error displaying widget: model not found', but the ways to solve the problem were different. On Linux, several versions, and on Windows.

I don't understand why Jupyter does not contain its own possibility to display DataFrames in a reasonable way. The built-in display makes it feel like you have to operate the keyboard with gloves on.

@chtertl
Copy link

chtertl commented Jan 20, 2022

Jupyter noob here, on Macos with Anaconda. I am getting the model not found error too. Have not tried all the tricks above but I did try un/re-installing Jupyter. Qgrid seems so fundamental, I'm astounded that the Jupyter team would allow it to be perpetually broken like this. Alternatives? I messed with ipyaggrid, but it seems to require a lot of explicit parameter construction, including column definitions: doesn't fill the bill for a handy interactive tool that you can thrown any dataframe into. Tried Tabloo but it opens a separate browser tab. Also I couldn't get either of those to actually work, either.

@stefaneidelloth
Copy link

stefaneidelloth commented Jan 21, 2022

The generic "model not found error" can have many different origins. For example, for me the issue was that another extension screwed up the JavaScript part by adapting the requirejs config in a way that was not compatible to qgrid. Such an error can not/hardly be controlled by the developers of individual extensions. The JavaScript API changed with Jupyter version 3 and I guess that is why many extensions have issues/need to be adapted.

Therefore, in order to eliminate some potential error sources, I recommend that you try a fresh installation, put it under version control and then install a single extension you would like to check.

If you use JupyterLab 3 you might want to try the qgrid fork mentioned above:

https://github.com/JohnOmernik/qgrid

If the error still occurs, have a look at the JavaScript console output of your browser (e.g. in Chrome Dev tools, F12) to get more info about the underlying issue.

@ankostis
Copy link

Omnerik's fork works fine with all latest jupyter machinery minus ipywidgets-8+ (ie after PitterPatterPython/qgrid#10 has been merged).

And it is packaged with all NPM dependencies in wheels, and works out of the box without internet.

@zhihanyue
Copy link

I've created a new repo QgridNext to continue maintaining it for future Jupyter versions. Now it is compatible with recent releases of Jupyter:

QgridNext JupyterLab Notebook Voila
v2.0.0 v3 - v4 v5 - v7 v0.2 - v0.5

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