Skip to content
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

Fix SeekableFileObject does not have readline when loading HTTP file #1084

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Pandede
Copy link
Contributor

@Pandede Pandede commented May 8, 2024

Fixes #1065.
The reason of this issue is Pillow sometimes read the image with .readline but not only .read.

Update:
It happens seldomly when loading a WebP image.

Copy link
Contributor

@FirefoxMetzger FirefoxMetzger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks good ... just the test image is unlicensed, so we will have to find an alternative (again ._.).

@Pandede do you know what causes Pillow to use readline vs read? If so, we can probably generate an artificial test image and use it for the test here.


There also is an issue with CI right now. Github has switched Mac runners to M1 and some of our old plugins don't support that. I'm looking currently looking into a fix and will let you know once it's in master so we can run the test suite again.

@Pandede
Copy link
Contributor Author

Pandede commented May 13, 2024

I may reproduce the bug with this test image of Pillow.
Note that although the extension of this image (fotografia-a-coruna.jpeg) is JPEG, it is actually a WebP image.

Copy link
Contributor

@FirefoxMetzger FirefoxMetzger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pillow's test images work perfect for us :) LGTM

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.

AttributeError: 'SeekableFileObject' object has no attribute 'readline'
2 participants