thanks, that did the trick for images under 64kb, the following works for all images: try: photo._data = file.read() except AttributeError: if type(file) is type(''): photo._data = file else: photo._data = file.data file=file.next while file is not None: photo._data += file.data file=file.next --On Donnerstag, März 21, 2002 10:09:00 -0500 Ron Bickers <rbickers-dated-1017328138.23aa81@logicetc.com> wrote:
-----Original Message----- From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Joachim Schmitz
I have a bunch of images in the ZODB, which I want to convert to Photos in the Photo product.
Error Type: AttributeError Error Value: read
There is a problem with Photo 1.2.3 that breaks what you're doing. Apply the following changes to fix it:
In Photo.py, manage_addPhoto(), replace the following line:
photo._data = file.read()
with this:
try: photo._data = file.read() except AttributeError: photo._data = file
_______________________
Ron Bickers Logic Etc, Inc.
Mit freundlichen Grüßen Joachim Schmitz -------------------------------------------------------------------- AixtraWare Ingenieurbüro für Internetanwendungen Hüsgenstr. 33a, D-52457 Aldenhoven Telefon: +49-2464-8851, FAX: +49-2464-905163 -------------------------------------------------------------------- Key fingerprint = DA10 CC82 62F8 1DBB 39A1 1EDC 725B 3317 A8D7 C3A6 Keyserver: http://germany.keyserver.net/en/