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

Quick fix: revert #3341 due to regression #3415

Merged
merged 3 commits into from
Oct 18, 2018
Merged

Conversation

homm
Copy link
Member

@homm homm commented Oct 18, 2018

from PIL import Image, ImageOps

with open('input/256.webp', 'rb') as blob:
    Image.open(blob).load()
    Image.open(blob).load()
/home/homm/Code/Pillow/src/PIL/Image.pyc in open(fp, mode)
   2611 
   2612     try:
-> 2613         fp.seek(0)
   2614     except (AttributeError, io.UnsupportedOperation):
   2615         fp = io.BytesIO(fp.read())

ValueError: I/O operation on closed file

@homm
Copy link
Member Author

homm commented Oct 18, 2018

@radarhere @hugovk I reverting #3341. Warning is better than ValueError.

Please, look for a better way to fix it, probably with _exclusive_fp check.

@homm homm merged commit b8e7f64 into master Oct 18, 2018
@homm homm deleted the fix-webp-loading-from-blob branch October 18, 2018 08:38
@hugovk
Copy link
Member

hugovk commented Oct 19, 2018

@homm How does PR #3418 look?

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.

2 participants