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

Adding and Removing Rows does not work #59

Closed
mirage007 opened this issue Feb 10, 2016 · 6 comments
Closed

Adding and Removing Rows does not work #59

mirage007 opened this issue Feb 10, 2016 · 6 comments

Comments

@mirage007
Copy link

The following code seems to throw some javascript errors when I click on Add/Remove Rows:
Selection and Editing still seem to work fine.

This is using python 2.7, IPython 4.1.1 and master branch of qgrid.

import qgrid
import IPython
print IPython.__version__

import pandas
import numpy as np

res = pandas.DataFrame(np.arange(20).reshape(10,2))
res.index = np.arange(len(res))

qgrid.nbinstall(overwrite=True)
qgrid.show_grid(res, show_toolbar=True)

The exception I see in the chrome js console reads:

Exception in Comm callback Each data element must implement a unique 'id' property undefined Object {parent_header: Object, msg_type: "comm_msg", msg_id: "b14613d9-f5a9-4c99-bc7e-3d8516296885", content: Object, header: Object…}buffers: Array[0]channel: "iopub"content: Objectcomm_id: "83a82de5e21e4a588d83b7d054924db6"data: Objectcontent: Objectmethod: "custom"proto: Object__proto__: Objectheader: Objectmetadata: Object__proto__: Objectmsg_id: "b14613d9-f5a9-4c99-bc7e-3d8516296885"msg_type: "comm_msg"parent_header: Object__proto__: Object

Any thoughts?

@rdhyee
Copy link
Contributor

rdhyee commented Feb 10, 2016

As I've been getting up to speed with qgrid, I've been fixing problems on my fork...take a look at master...rdhyee:fix-add-row. I'm not ready to issue a PR yet. #58 might also be relevant.

@mirage007
Copy link
Author

I am able to work around this issue for now by simply adding a few ipywidgets buttons that update grid.df with a new dataframe. This probably does not scale very well but works for now as long as the table is small.

@blink1073
Copy link
Contributor

I can reproduce, I will fix this in #58.

@blink1073
Copy link
Contributor

This should be fixed now in #58, @TimShawver, can you verify?

@TimShawver
Copy link
Contributor

Cool, I'll take a look today.

@TimShawver
Copy link
Contributor

This is fixed by #65

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

4 participants