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
AttributeError: 'PngImageFile' object has no attribute '_PngImageFile__frame' #4509
Comments
Git bisect says 67e3ccf is the first bad commit, from #4243.
@pmrowla Hi, please could you check this? Thank you! |
Ping @almarklein from https://github.com/imageio/imageio, FYI. |
Minimal test case, not using imageio: from PIL import Image
im = Image.open("Tests/images/hopper.png")
im.seek(0) Possible fix: diff --git a/src/PIL/PngImagePlugin.py b/src/PIL/PngImagePlugin.py
index 5bb0e2ff..afa39bc9 100644
--- a/src/PIL/PngImagePlugin.py
+++ b/src/PIL/PngImagePlugin.py
@@ -631,6 +631,7 @@ class PngImageFile(ImageFile.ImageFile):
format = "PNG"
format_description = "Portable network graphics"
+ __frame = 0
def _open(self): |
Possible fix: #4512. |
I'm seeing this too. I believe it's caused by PIL 7.1.0. 7.0.0 works fine. |
Pillow 7.1.1 has been released with a fix for this: #4354 (comment). Thanks all! |
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 |
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 |
can do. thanks! |
Moved to #4518 |
@nabobalis I'd guess this is also a Pillow bug, there were big changes to @pmrowla Please could you have a look at this? See also google/fonts#2380 (comment). Thanks! |
Versions greater than 7.0.0 have the following issues - python-pillow/Pillow#4518 - python-pillow/Pillow#4509
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! |
Pillow 7.1.2 has now been released with the fix for the second problem described here. |
What did you do?
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.
https://github.com/bentoml/BentoML
https://travis-ci.org/github/bentoml/BentoML/jobs/669765333?utm_medium=notification&utm_source=github_status
What did you expect to happen?
imageio.imread('./image.png')
should workWhat actually happened?
What are your OS, Python and Pillow versions?
It seems related to #4243
The text was updated successfully, but these errors were encountered: