-
Notifications
You must be signed in to change notification settings - Fork 23
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
Avoid errors when image size is empty #34
Conversation
@cekk the build is failing on Plone 4.3; could you please help me debugging it? |
mmm..strange. Have you ever had a similar problem? |
this happens when running tests in coverage mode takes too long; but I don't see why is taking too long here. I already restarted the build a couple of times with no luck. could you please run the tests in coverage mode locally? |
locally, the coverage works:
It's near the 10 minutes limit..maybe travis was a bit slow when the test ran? |
the function that generates the images takes too long, Andrea: https://github.com/collective/sc.social.like/blob/master/sc/social/like/testing.py#L12 could you please remove completely that function and add a bunch of static images to the tests folder? I have no time to work on this right now. that was a bad idea from the beginning. |
a8cfeec
to
f779316
Compare
Changes Unknown when pulling f779316 on fix_image_scale_empty into * on master*. |
f779316
to
7f836ba
Compare
@hvelarde done. Now images are static and they are simply loaded from |
Avoid errors when image size is empty
Hi,
i've found that there were a problem when a news has a non "standard" image (for example a bmp or a tiff).
The utils can't get his size, and tried to create a miniature passing width="" and height="", and generate a bad Pillow error: MemoryError.
The strange thing is that with images stored in blob, this doesn't happens.
The workaround is to return None if we can't get the sizes. This could be related (and close) the issue #31
P.S.: some tests don't pass for a buildout problem