Skip to content

Conversation

@TimShawver
Copy link
Contributor

@TimShawver TimShawver commented Jun 6, 2016

@ssanderson I merged a fix over the weekend 509b303 which makes qgrid compatible with ipywidgets 5+ and jupyter notebook 4.2.x (it previously was not, which I found out through this issue #75).

Could you try out master locally and make sure it works for you, and if everything looks good, merge this PR, tag a release with v0.4.0, and upload it to pypi? I didn't want to tag a release until someone else tried it out locally, since last time we needed some additional changes and I had to delete the release and retag it. I can add the release notes once you merge this PR and create the tag.

@ssanderson
Copy link
Contributor

I'll try to take a look at this today

@ssanderson
Copy link
Contributor

Assigning this over to @richafrank.

@richafrank
Copy link
Member

Runs well for me in the following env:

$ pip freeze|grep -E "ipy|jupyter"
ipykernel==4.3.1
ipython==4.2.0
ipython-genutils==0.1.0
ipywidgets==5.1.5
jupyter-client==4.3.0
jupyter-core==4.1.0

I saw that "Add Row" displayed a popup with "Cannot add a row to a table with a non-integer index," which makes sense to me. "Remove Row," however, produced a traceback:

ValueError                                Traceback (most recent call last)
/Users/rich/Dev/qgrid/qgrid/grid.py in _handle_qgrid_msg(self, widget, content, buffers)
    345             return
    346         if content['type'] == 'remove_row':
--> 347             self.df.drop(content['row'], inplace=True)
    348             self._dirty = True
    349 

/Users/rich/.virtualenvs/qgrid3/lib/python3.4/site-packages/pandas/core/generic.py in drop(self, labels, axis, level, inplace, errors)
   1875                 new_axis = axis.drop(labels, level=level, errors=errors)
   1876             else:
-> 1877                 new_axis = axis.drop(labels, errors=errors)
   1878             dropped = self.reindex(**{axis_name: new_axis})
   1879             try:

/Users/rich/.virtualenvs/qgrid3/lib/python3.4/site-packages/pandas/indexes/base.py in drop(self, labels, errors)
   3049             if errors != 'ignore':
   3050                 raise ValueError('labels %s not contained in axis' %
-> 3051                                  labels[mask])
   3052             indexer = indexer[~mask]
   3053         return self.delete(indexer)

ValueError: labels [5] not contained in axis

Not sure if that's new or not.

@TimShawver TimShawver changed the title Changes for 0.4.0 release Changes for 0.3.2 release Jun 13, 2016
@TimShawver
Copy link
Contributor Author

This issue is happening with older versions of jupyter notebook and ipywidgets so it's not new. Seems like it only happens in grids without an integer index, so maybe the "Remove Row" button needs to also be disabled in that case.

Since it's not new I'm going to punt on it for now. I'll merge this version number change and get this uploaded to pypi, since what we have on there now has compatibility problems and also uses exact versions in requirements.txt, so it downgrades packages unnecessarily.

I decided I'll call this version 0.3.2 instead of 0.4.0 since there are very few changes in this release, and it doesn't break compatibility with older versions.

@TimShawver TimShawver merged commit ee1299e into master Jun 13, 2016
@TimShawver TimShawver deleted the tag-new-release branch June 13, 2016 03:16
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

Successfully merging this pull request may close these issues.

4 participants