Comments (16)
I have the exactly same issue.
Functions call by clicking on "Export" toolbar are : display_html and display_javascript
while show_grid call function display
any idea ? thanks
from qgrid.
Great! This worked for me. Thanks.
from qgrid.
Ok, walking through all of that got working. So for Jupyterhub, the trick is to use remote_js=True (and ensure things aren't cached).
from qgrid.
Thanks for the detailed report. I haven't tried qgrid with jupyterhub yet, but based on what I'm reading online, it seems widgets that work with jupyter notebook should also work on jupyterhub. Did you happen to try any other widgets to see if you could get them working? If other widgets are working and qgrid is the only widget that's not then there's probably a bug I need to fix.
If you're not able to get widgets working with jupyterhub at all, this thread might be helpful: https://groups.google.com/forum/#!topic/jupyter/n-GI5uNuHNU
from qgrid.
I haven't dug in but I suspect this is happening because assets are always being loaded from /nbextensions
vs NotebookApp.base_url
+ /nbextensions
from qgrid.
I suspect that @rushtehrani is correct. This is happening for us on multiple JupyterHub servers and it only affects qgrid.
from qgrid.
I got exactly the same problem when running with jupyterhub.
All other widgets are working. And I definitely have the same python running.
The error is
https://xxx/hub/nbextensions/qgridjs/lib/slick.grid.css Failed to load resource: the server responded with a status of 404 (Not Found)
and the same for all .js ..
Somehow the path "/hub/nbextensions" seems strange to me.
And qgrid is installed globaly unter /usr/share/jupyter/nbextensions/qgridjs
Is there a workaround to correct the url-path? It sounds easy to fix, but I don't know where to do that.
from qgrid.
Thanks for all the info. I was able to reproduce this, and I'm working on a fix for it. I don't have a quick fix in mind but I have another larger project in progress that I know will fix it. Basically I'm going to update the packaging/deployment so that it behaves just like other widgets, which will also make it work in jupyterhub.
In the meantime you can get around this issue by setting the remote_js
option to True
before attempting to call show_grid
in your notebook. If you've already called show_grid
with remote_js
set to it's default value of false, you may need to clear all cell output and refresh the page (using your browser's refresh button) for this workaround to take effect.
Since you'll always want remote_js
to be True
, the easiest way to do this is probably to execute qgrid.set_defaults(remote_js=True)
in any notebook in which you want to use qgrid. You can also pass this option into the show_grid
function itself, as described in the docs here: http://qgrid.readthedocs.io/en/latest/#qgrid.show_grid
from qgrid.
I am (I think( running into this issue. I am running Jupyter via Jupyter hub and I all I get when I do show grid is a little X where the widgets go. I tried the remote_js and it's still not working here... where should I look for logs that can help me troubleshoot? My jupyter notebook server doesn't having any glaring entries that concern me...
from qgrid.
@JohnOmernik if you open up your browser's developer tools (on Chrome and OS X it's under View -> Developer -> Developer Tools) and then click on the Console tab you might see some errors there that could help us diagnose the issue.
from qgrid.
So I see a request for
Which I get a 302 found with a location of /hub/nbextensions/qgridjs/lib/slick.grid.css
Which then I get a not found (404) request for: https://jupyterhub-mainhub-prod.marathon.slave.mesos:22443/hub/nbextensions/qgridjs/lib/slick.grid.css 404
(Also for qgrid.css) Does that help?
from qgrid.
Yea that's helpful. It seems like the remote_js=True
setting has not taken effect in your notebook. I would expect qgrid to be attempting to load those css files from https://cdn.rawgit.com/quantopian/qgrid/
if remote_js=True
was working. I think maybe what's happening is you have another cell in your notebook where rendering qgrid failed, and the output from that cell is saved with your notebook. To clear that cell output, and make sure it's javascript doesn't run again you can try the following steps:
- In the notebook menu, clear all cell output:
- Save the notebook (with all your cell output cleared).
- Click the refresh button on your browser to refresh the page.
- Before attempting to call
qgrid.show_grid
, execute a cell withqgrid.set_defaults(remote_js=True)
- Now try and render your qgrid with a call to
show_grid
or by constructing aQGridWidget
directly and displaying it.
If that doesn't work it might be that your browser is doing some aggressive caching so you might try disabling caching in your browser temporarily while you're going through these steps. Normally the way I do this is by enabling Disable cache (while DevTools is open)
in the settings for Chrome's dev tools, and then leaving the dev tools panel open while I'm troubleshooting.
from qgrid.
Yea that's the situation for now. The next release I'm working on will eliminate the need for this workaround.
from qgrid.
Hi,
I have the same problem with JupyterHub. No errors but the grid doesn't show.
Unfortunqtely using qgrid.set_defaults(remote_js=True) did not solve the problem. Any other suggestions ?
Thanks !
from qgrid.
@hbensalem I just discovered that qgrid is not working with ipywidgets 7.x (it only works with 6.x). I have a new branch of qgrid that will work with 7.x, and I'll likely merge it soon in light of this discovery.
Could you check your version of ipywidgets, and if it's 7, try using 6 instead if possible?
from qgrid.
This is fixed in qgrid 1.0, which is currently available in beta form. See the installation instructions on the updated readme page.
To use qgrid with Jupyterhub, simply install it according to the installation instructions on the readme in the same environment where you're running Jupyterhub. The special steps I've listed above should now be unnecessary.
from qgrid.
Related Issues (20)
- grid does not support add_rows on an empty dataframe. Could we stop the user from removing the last row?
- qgrid incompatible with ipywidgets==8.0.0a6 due to decorator usage HOT 1
- Qgrid working with Modern Jupyter Lab (3.2 and beyond)
- Set Formatter for Column Definitions
- AttributeError: 'DataFrame' object has no attribute 'map'
- [Security] Workflow main.yml is using vulnerable action actions/checkout
- missing 1 required positional argument: 'widget' HOT 3
- qgrid not working in Binder notebook
- update for ipywidgets 8 compatibility HOT 1
- qgrid post link fails on environment build HOT 2
- REPO IS NO LONGER MAINTAINED AND DOES NOT SUPPORT JUPYTERLAB>=3.0.0 HOT 8
- QGrid is not working with NB-viewer.
- Internet connection required for qgrid 1.1.3 HOT 1
- Here, working version HOT 12
- filter_changed is not recognised in .on() HOT 1
- "ImportError: cannot import name 'Mapping' from 'collections' (C:\ProgramData\anaconda3\lib\collections\__init__.py)"
- post-link script failed for package conda-forge::qgrid-1.3.1-py39hcbf5309_2
- Filter not working HOT 1
- Detecting row selected in Python shiny
- Cannot edit the table using responsive setting
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qgrid.