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
{{ message }}
Repository navigation
AttributeError: 'PngImageFile' object has no attribute '_PngImageFile__frame' #4509
My library BentoML is using imageio and Pillow in its tests, and with the latest release of Pillow 7.1.0 half an hour ago, I noticed some existing tests are breaking.
Git bisect says 67e3ccf is the first bad commit, from #4243.
commit 67e3ccffeb09903e22c29d737e74070415890ed8
Date: Sun Dec 1 12:50:21 2019 +0900
Add APNG support
See #3483
Adds support for reading APNG files and seeking through frames,
and adds basic support for writing APNG files.
src/PIL/PngImagePlugin.py | 401 ++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 390 insertions(+), 11 deletions(-)
@pmrowla Hi, please could you check this? Thank you!
changed the title [-]Issue reading PNG files[/-][+]ImageIO: AttributeError: 'PngImageFile' object has no attribute '_PngImageFile__frame'[/+]on Apr 1, 2020
changed the title [-]ImageIO: AttributeError: 'PngImageFile' object has no attribute '_PngImageFile__frame'[/-][+]AttributeError: 'PngImageFile' object has no attribute '_PngImageFile__frame'[/+]on Apr 1, 2020
Thanks for the very quick fix! just curious whether think you might end up removing 7.1.0 from pypi? (or whether we should keep Pillow!=7.1.0 in our requirements.txt even if pillow is just an indirect dependency)
For an indirect dependency, you're probably fine removing it, especially as there was only a short time between 7.1.0 and 7.1.1.
If the problem comes up (seldom), you could ask people to upgrade. If it comes up a lot, you could pin it, or alternatively ask the dependency to add !=7.1.0.
We've merged a fix (#4528) for the new bug (#4518). Before we release, it would be helpful if people could run their test suites with the master branch to check if there are other regressions. Thanks!
Activity
hugovk commentedon Apr 1, 2020
Git bisect says 67e3ccf is the first bad commit, from #4243.
@pmrowla Hi, please could you check this? Thank you!
hugovk commentedon Apr 1, 2020
Ping @almarklein from https://github.com/imageio/imageio, FYI.
[-]Issue reading PNG files[/-][+]ImageIO: AttributeError: 'PngImageFile' object has no attribute '_PngImageFile__frame'[/+]hugovk commentedon Apr 1, 2020
Minimal test case, not using imageio:
Possible fix:
tlambert03 commentedon Apr 1, 2020
we're seeing this too in our tests at napari.
[-]ImageIO: AttributeError: 'PngImageFile' object has no attribute '_PngImageFile__frame'[/-][+]AttributeError: 'PngImageFile' object has no attribute '_PngImageFile__frame'[/+]hugovk commentedon Apr 1, 2020
Possible fix: #4512.
pmrowla commentedon Apr 2, 2020
@hugovk's change in #4512 fixes this for me. Sorry for the hassle everyone!
SteveDoyle2 commentedon Apr 2, 2020
I'm seeing this too. I believe it's caused by PIL 7.1.0. 7.0.0 works fine.
hugovk commentedon Apr 2, 2020
@pmrowla Thanks for checking! I've merged #4512.
Others: if you could test with master for any other regressions, that'd be appreciated.
hugovk commentedon Apr 2, 2020
Pillow 7.1.1 has been released with a fix for this: #4354 (comment).
Thanks all!
tlambert03 commentedon Apr 2, 2020
Thanks for the very quick fix! just curious whether think you might end up removing 7.1.0 from pypi? (or whether we should keep
Pillow!=7.1.0in our requirements.txt even if pillow is just an indirect dependency)hugovk commentedon Apr 2, 2020
For an indirect dependency, you're probably fine removing it, especially as there was only a short time between 7.1.0 and 7.1.1.
If the problem comes up (seldom), you could ask people to upgrade. If it comes up a lot, you could pin it, or alternatively ask the dependency to add
!=7.1.0.tlambert03 commentedon Apr 2, 2020
can do. thanks!
nabobalis commentedon Apr 3, 2020
Moved to #4518
hugovk commentedon Apr 3, 2020
@nabobalis I'd guess this is also a Pillow bug, there were big changes to
PngImagePlugin.pyin 7.1. Please could you report a new issue? https://github.com/python-pillow/Pillow/issues/new?template=ISSUE_REPORT.md@pmrowla Please could you have a look at this?
See also google/fonts#2380 (comment).
Thanks!
setup: pin Pillow to 7.0.0
hugovk commentedon Apr 6, 2020
We've merged a fix (#4528) for the new bug (#4518). Before we release, it would be helpful if people could run their test suites with the
masterbranch to check if there are other regressions. Thanks!tlambert03 commentedon Apr 6, 2020
I can confirm for napari that all tests fails and issues we observed in 7.1.0 and 7.1.1 are fixed in 7.2.0.dev0. thanks!
radarhere commentedon Apr 26, 2020
Pillow 7.1.2 has now been released with the fix for the second problem described here.