-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Issue #8650 fixed #9602
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
Issue #8650 fixed #9602
Conversation
self._renderer.draw_path(gc, path, transform, rgbFace) | ||
if rgbFace is not None: | ||
rgbFace = tuple(rgbFace) | ||
self._renderer.draw_path(gc, path, transform, rgbFace) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You accidentally removed try
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me fix that, thanks!
Added the 'try:' i accidentally removed and fixed issue #8650
The circle CI failures are because the commit this is based on is older than the fix for that ( #9325 ), those can be disregarded here (or @malgamves can you rebase on to current master?) The failure on travis is due to some trailing whitespace. The automated style checkers are a bit annoying, but the do help keep the code-base consistent, which is important for big projects with lots of contributors. It would be better if we had a test to exercise the original issue (to make sure this really fixes it!) but this code path is covered in the tests so I am 👍 to this going in with out an extra test. Thanks for your work on this @malgamves ! |
I do not think the fix is doing a right thing. In many places you can find matplotlib/lib/matplotlib/patches.py Line 548 in 9ea08fb
|
Yes, I can rebase on the current master. Lets see if that works. |
This is the last step before we drop down to the c++ layer, I suspect that not-tuple may be the correct type for the python side and tuple is the correct type for this call. |
The culprit is matplotlib/src/py_converters.cpp Line 198 in 57c845b
which uses PyArg_ParseTuple (which expects exactly a tuple). Note that this is also used by draw_markers (https://github.com/matplotlib/matplotlib/blob/master/src/_backend_agg_wrapper.cpp#L254) so again we should either make sure to normalize the input early, or fix convert_rgba to accept any sequence. (I tried to fix it quickly at the C-level but things are slightly messy because (of course...) 0-dim numpy arrays return true to PySequence_Check but trigger an error on PySequence_Size, bleh :/) |
I'm going to close this - it fixes a poorly documented error, and no one else has complained. There also seems to be some petered-out concern w/ how this was implemented. Thanks @malgamves and sorry this didn't come to fruition. |
Fixed the system error mentioned in issue #8650
PR Summary
PR Checklist