At 5:20 PM +0000 2/18/02, Chris Withers wrote:
Dan Shafer wrote:
def makeThumbnail(self, original_id, size=128)
from PIL import Image from cStringIO import StringIO import os.path
# create a thumbnail image file original_image=getattr(self, original_id) original_file=StringIO(original_image.data)
So, this is the line with the bug.
What's data? What's original_image? I suspect data is of a type the StringIO doesn't like. You sure you haven't got a typo here?
The makeThumbnail script runs fine when executed directly in a URL. Works flawlessly every time. Only when I call it from the script that attempts to iterate over all the images in a directory and create thumbnails to I encounter the bug I reported. So I don't _think_ it's a typo here. I did submit a followup to my original report in which I indicated that if I call this script inside a folder lower in the object structure than where the script is defined, I get a different result than if I execute it from the level where the script is. I'm guessing at this point that there is something strange about the images I'm processing or their names or some such. But since I'm just copying stuff out of the Zope Book, I'm really sort of clueless. I appreciate your continuing efforts to help.
cheers,
Chris
-- Dan Shafer, Personal Creativity Trainer and Consultant Trained Hartman Value Profile Analyst http://www.danshafer.com/valueprofile.html