qgrid
qgrid copied to clipboard
QGrid on Voila: does not display
Hi everyone, I am having difficulties to render the very great qgrid tables (from dataframe) via Voila.
Environment
- Operating System: Ubuntu
- Python Version: 3.8.5
- How did you install Qgrid: pip
- Python packages: Latest qgrid
Description of Issue
- Expected: The dataframe table should be displayed as a QGrid table with controls to edit.
- Output: Blank page. The notebook does not render the dataframe when served with Voila.
Reproduction Steps
- Created a dataframe using Pandas
- Used
qdf = qgrid.show_grid(df, show_toolbar=True);qdf
to render it in the notebook - Rendering through
ipywidgets.HBox([qdf], layout={'width': '1000px'})
- When served with voila,
$voila test.ipynb
, there is a blank screen - Terminal gives the following error
[W 12:52:06.423 NotebookApp] 404 GET /nbextensions/nbextensions_configurator/tree_tab/main.js?v=20210311125204 (127.0.0.1) 12.290000ms referer=http://localhost:8888/tree
[W 12:52:10.354 NotebookApp] Notebook WDN Scheduler - qgrid.ipynb is not trusted
[W 12:52:10.417 NotebookApp] 404 GET /nbextensions/nbextensions_configurator/config_menu/main.js?v=20210311125204 (127.0.0.1) 2.400000ms referer=http://localhost:8888/notebooks/WDN%20Scheduler%20-%20qgrid.ipynb
[I 12:52:10.897 NotebookApp] Kernel started: 1159ddc1-a9f9-41fa-8764-7d64b47f1789, name: python3
[W 12:52:10.971 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20210311125204 (127.0.0.1) 3.260000ms referer=http://localhost:8888/notebooks/WDN%20Scheduler%20-%20qgrid.ipynb
[I 12:52:11.780 NotebookApp] Saving file at /WDN Scheduler - qgrid.ipynb
[W 12:52:11.781 NotebookApp] Notebook WDN Scheduler - qgrid.ipynb is not trusted
[W 12:52:11.914 NotebookApp] Notebook WDN Scheduler - qgrid.ipynb is not trusted
/home/sam/anaconda3/envs/waterDN2/lib/python3.8/site-packages/jupyter_client/kernelspec.py:252: UserWarning: Invalid kernelspec directory name (Kernel names can only contain ASCII letters and numbers and these separators: - . _ (hyphen, period, and underscore).): /home/sam/.local/share/jupyter/kernels/julia-(8-threads)-1.5
d = self.find_kernel_specs()
/home/sam/anaconda3/envs/waterDN2/lib/python3.8/site-packages/jupyter_client/kernelspec.py:252: UserWarning: Invalid kernelspec directory name (Kernel names can only contain ASCII letters and numbers and these separators: - . _ (hyphen, period, and underscore).): /home/sam/.local/share/jupyter/kernels/julia-(4-threads)-1.5
d = self.find_kernel_specs()
[I 12:52:12.220 NotebookApp] Kernel started: fbe8d494-9348-4e04-855c-87504ad82810, name: python3
[W 12:52:15.990 NotebookApp] 404 GET /voila/jupyter-vue.js (127.0.0.1) 2.300000ms referer=http://localhost:8888/voila/render/WDN%20Scheduler%20-%20qgrid.ipynb
[W 12:52:15.992 NotebookApp] 404 GET /voila/jupyter-vuetify.js (127.0.0.1) 2.880000ms referer=http://localhost:8888/voila/render/WDN%20Scheduler%20-%20qgrid.ipynb
[W 12:52:15.994 NotebookApp] 404 GET /voila/qgrid.js (127.0.0.1) 1.700000ms referer=http://localhost:8888/voila/render/WDN%20Scheduler%20-%20qgrid.ipynb
Thanks, Sam
See https://github.com/voila-dashboards/voila/issues/72 - there are a couple patches you can apply as a workaround (one in voila, or one in qgrid).
So why nobody fixes it, if the solution is known (to remove base/js/dialog stuff)? What does it take for someone to add it & release?
Since Qgrid has ceased maintenance, I've created a new repo QgridNext to continue maintaining it for future Jupyter versions.
It removed full screen mode causing this issue and fixed infinitely expanding width of the container in voila <= 0.3. Now it supports Voila v0.2 - v0.5. Please let me know if any further issues arise.