You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bug summary
I use matplotlib + PyQt5. The figure is placed inside a QSplitter (a standard Qt widget that consists of several vertical or horizontal parts which can be resized by handles between those parts) . When a part of QSplitter shrinks to a zero size it automatically resizes the widget it contains. Matplotlib raises an error as was mentioned in #16687.
Actual outcome
ValueError: figure size must be positive finite not [17.45 0. ]
It didn't segfault libpng (we had a RuntimeError instead, afaict) and doesn't cause any problems (well, other than a SystemError) with Pillow. (I think especially on 3.3+ we should just propagate out whatever exception Pillow generates; if people want some other exception for zero-sized figure they should just argue about that on the Pillow tracker.)
Activity
tacaswell commentedon Apr 10, 2020
Fair enough.
I guess we need some checks for 0 size to bail as quickly as possible and make sure we don't segfault libpng in 3.2.x.
anntzer commentedon Apr 11, 2020
It didn't segfault libpng (we had a RuntimeError instead, afaict) and doesn't cause any problems (well, other than a SystemError) with Pillow. (I think especially on 3.3+ we should just propagate out whatever exception Pillow generates; if people want some other exception for zero-sized figure they should just argue about that on the Pillow tracker.)
MNT: allow 0 sized figures