[Zope] Photo Product: Can't convert images.

Ron Bickers rbickers-dated-1012631651.9cfa86@logicetc.com
Sat, 26 Jan 2002 01:34:11 -0500


> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Mark
> Simpson

> I'm using the Photo Folder product, and I'm trying to convert a number of
> jpg's by using the "Python Script" shown in the README.txt for
> the product:

> I get the following error when calling the Image2Photo script on
> the folder:
>
> Error Type: AttributeError
> Error Value: 'string' object has no attribute 'read'

> Can anyone see what I'm doing wrong, or what I need to fix?

You're not doing anything wrong.  As someone else has pointed out, I broke
this capability in version 1.2.3 while trying to add some other feature.

This is completely untested, but try replacing line 654 with the following
and let me know if it works:

  try:
      photo._data = file.read()
  except AttributeError:
      photo._data = file

I'll fix this one way or another in the next version, but I don't know when
that will be.
_______________________

Ron Bickers
Logic Etc, Inc.