Comments (17)
I had the same problem when working with anaconda (after conda install qgrid). Finally I succeeded to get it working in anaconda as follows:
- I moved the folders created by qgrid.nbinstall to the anaconda folder ... \share\jupyter\nbextensions
- I had to conda install ipywidgets
After this the qgrid appeared. I tried to look into the qgrid.nbinstall function, but at first glance it was not clear to me what should be changed.
from qgrid.
Same problem here - the problem was resolved by reloading the notebook - not sure what the issue was
from qgrid.
I don't know what those errors mean, but I would suggest looking at the sample notebook on nbviewer to see how qgrid is used. Two things that I see missing:
- You need to run nb_install to install the widget to your local jupyter notebook instance
- You need to call show_grid to actually render the DataFrame. Qgrid doesn't automatically take over DataFrame rendering, it has to be told explicitly via a call to show_grid.
To get the sample notebook running locally, clone the repository using
git clone https://github.com/quantopian/qgrid.git
and then follow the steps in the section Running the Demo Locally. Apologies if the docs are confusing, I'm going to try to clean them up a bit.
from qgrid.
Ooops I think I copied the wrong python code. How silly of me. This is the code I am using:
import qgrid
qgrid.nbinstall(overwrite=True) # copies javascript dependencies to your /nbextensions folder
qgrid.set_defaults(remote_js=True)
import pandas as pd
import numpy as np
randn = np.random.randn
# Set this pandas option to prevent the grid from being too big
pd.set_option('display.max_rows', 8)
# Get a pandas DataFrame containing the daily prices for the S&P 500 from 1/1/2011 - 1/1/2014
from pandas.io.data import get_data_yahoo
spy = get_data_yahoo(
symbols='SPY',
start=pd.Timestamp('2011-01-01'),
end=pd.Timestamp('2014-01-01'),
adjust_price=True,
)
qgrid.show_grid(spy)
from qgrid.
Where specifically is nbinstall supposed to copy the extension to?
from qgrid.
Your code worked for me. What version of qgrid / pandas are you using?
from qgrid.
So, I no longer use the machine I had this issue on. I tried it on my new machine, (also with safari instead of chrome) and worked fine.
If I run into trouble again, I will update, but for now I will close this issue.
from qgrid.
Unfortunately I have the same issue and used exactly the instructions from the example notebook. Is there a way to debug this? And what information would you need? Browser, packages, etc?
Edit: I think copying the data to my local folder does not work, because I can't find any files there. After calling qgrid.nbinstall
with user=False
(from the console with admin rights), files get copied to /usr/local/share/jupyter/nbextensions/qgridjs
. Still, no qgrids are shown in my notebooks.
Edit2: Heres the output from my browser console:
GET http://localhost:8888/static/jupyter-js-widgets.js?v=20160710154640 404 (Not Found)
Couldn't create a view for model id '2c1ebeed169549afaccc5570dfebaa5e' -- Error: Script error for "jupyter-js-widgets", needed by: nbextensions/qgridjs/qgrid.widget(…)
Could not create view -- WrappedError {stack: "Error: Couldn't create a view for model id '2c1ebe…n.js?v=dda91b55a04855a1c133b176c7a48905:12878:33↵", message: "Couldn't create a view for model id '2c1ebeed169549afaccc5570dfebaa5e'", error_stack: Array[3]}
Could not display model -- WrappedError {stack: "Error: Could not create view↵ at new Error (nativ…n.js?v=dda91b55a04855a1c133b176c7a48905:12878:33↵", message: "Could not create view", error_stack: Array[4]}
Uncaught (in promise) WrappedError {stack: "Error: Couldn't create a view for model id '2c1ebe…n.js?v=dda91b55a04855a1c133b176c7a48905:12878:33↵", message: "Couldn't create a view for model id '2c1ebeed169549afaccc5570dfebaa5e'", error_stack: Array[4]}
Uncaught (in promise) WrappedError {stack: "Error: Could not display model↵ at new Error (nat…n.js?v=dda91b55a04855a1c133b176c7a48905:12878:33↵", message: "Could not display model", error_stack: Array[4]}
from qgrid.
I had trouble finding the qgrid extension location.
It's located in ~/.local
if you did pip install --user qgrid
Copying the files like @keluc noted fixed this issue for me (I'm also using anaconda):
cp -r ~/.local/share/jupyter/nbextensions/qgridjs/ ~/anaconda3/share/jupyter/nbextensions/
Thanks!
from qgrid.
In case anyone is still seeing this issue, please try installing the new qgrid 1.0 beta using the instructions here: https://github.com/quantopian/qgrid#installation. As you'll see in those instructions, the nbinstall
step that appears to be an issue for some people is no longer required. This is because qgrid 1.0 follows the recommended installation/deployment guidelines provided by the ipywidgets team.
Only caveat for using qgrid 1.0 is that you need to be using ipywidgets version 7.x or newer.
from qgrid.
I have qgrid installed via conda install qgrid
but in the notebook, I get no response with;
import qgrid
qgrid.show_grid(df)
are there other steps that I need to take beyond importing it?
There are no errors when the cell is executed. My details are:
Operating System: Mac OS High Sierra
Browser: Firefox
Python Version: Python 3.6.3
How did you install Qgrid: conda
Notebook version: 5.0.0
ipywidgets version: 7.1.2
qgrid version: 1.0.1
from qgrid.
Upgrading to the latest browser may solve the issue.
from qgrid.
I tried to get it going on a simple sample but no luck so far...
I used pip for installation on python3. qgrid==1.0.2
chrome: Version 62.0.3202.94 (Official Build) (64-bit)
running on uptodate arch linux... (hope qgrid is not Windows only)
from qgrid.
@markfink : Hey i am having the same problem with exaclty the same code but I am using Windows version. Were you able to rectify the same.
from qgrid.
All, I have had some challenges on WinPy 3.6.7 / newer Chome / Notebook / fresh install of qgrid and samples today, but it's partly functional. I don't see any toolbars.
Two suggestions for users:
- My dfs only show up after qgrid_widget.get_changed_df(), not before. This only works in a second cell after the cell where show_grid runs.
- See if your notebook says "Untrusted" on the top right or if you have any messages like the one below in your cli:
[W 09:03:28.306 LabApp] Notebook winpyfolder/folder/mynotebook.ipynb is not trusted
If you do and only if you trust the notebook author, click trust on the top right of the notebook. Specifically you may need to click untrusted and then trust.
from qgrid.
@brettbrocato to see the df's, be sure you're saving the widget to a variable, and then calling that variable so it's shown in the output cell; this got my for the longest time.
import qgrid
qgrid_widget = qgrid.show_grid(df)
qgrid_widget # omitting this line saves the widget to a variable but it won't show
Apologies if you already knew this - just thought I'd place this here for anyone new to qgrid who stumbles across this!
from qgrid.
I'm am experiencing the same problem as the OP: web app works in jupyter notebooks (local), it works in Voila (local), but when I run it with Heroku - it doesn't display the jupyter notebook displays.
Heroku Warning:
2019-07-01T01:29:41.993853+00:00 heroku[router]: at=info method=GET path="/voila/bqplot.js" host=damp-retreat-67638.herokuapp.com request_id=e2e9446d-372c-41bb-b22f-90c4ae0e27b3 fwd="[hidden IP]" dyno=web.1 connect=0ms service=3ms status=404 bytes=240 protocol=https
2019-07-01T01:29:41.996535+00:00 app[web.1]: WARNING:tornado.access:404 GET /voila/bqplot.js (10.67.241.187) 1.09ms
2019-07-01T01:29:42.002571+00:00 app[web.1]: WARNING:tornado.access:404 GET /voila/qgrid.js (10.63.252.246) 0.90ms
2019-07-01T01:29:42.001537+00:00 heroku[router]: at=info method=GET path="/voila/qgrid.js" host=damp-retreat-67638.herokuapp.com request_id=6d6fdbe9-706d-4fdc-bb82-88c3462870c3 fwd="[hidden IP]" dyno=web.1 connect=1ms service=2ms status=404 bytes=240 protocol=https
it seems to be having trouble with "GET /voila/qgrid.js" and "GET /voila/bqplot.js"
Could this be a related issue?
from qgrid.
Related Issues (20)
- 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
- Introducing QgirdNext: bug fixes and compatibility improvements HOT 1
- Polars Support
- Integrating width VTable
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.