Hi I'm using the code below to fetch an image from a database, and for inserting the image as an Image object in ZOPE. The strange thing is that the code causes python to crash, but sometimes it work (for 1 of 10 or something like that). Im using Python 2.3.3 for Windows and Zope 2.7.0 for windows. I don't get any indication about what causing the error, but testing leaves me with an error on the code below. Does anyone know what I have done wrong?
imthumb = PIL.Image.open(StringIO(pic)) #pic is the blob from the db
imthumb.thumbnail(tsize) btfil = StringIO()
thumbnailtitle = str(pic)
I suggest you run Zope under gdb, as per:
which should give you some sense of what in particular is crashing.
I also don't know what that '.thumbnails' bit is doing in your invocation of the product / factory dispatcher. If the intent is to have the image created in the 'thumbnails' subfolder of 'self', then I would spell your invocation as:
dispatcher = self.thumbnails.manage_addProduct['OFSP'] dispatcher.manage_addImage( .... )
Tres. -- =============================================================== Tres Seaver [EMAIL PROTECTED] Zope Corporation "Zope Dealers" http://www.zope.com
Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce