[Zope] ImageFile problem?

Terry Hancock hancock@anansispaceworks.com
Sun, 28 Jul 2002 11:53:00 -0700


I'm seeing a mysterious problem with ImageFile images
in a Zope instance running on FreeBSD (I used the
thread stack-size patch for Python, BTW).  Python 2.1.3
and Zope 2.5.1.

The images are defined essentially like this:

class ImageContainer(Folder):
    # ...
    def __init__(self):
        self.img_a = ImageFile('www/Images/img_a.jpg', globals())
        # ...

class myproduct(Folder):
    # ...
    def __init__(self):
        self.Images = ImageContainer()
         # ...

(This seems to work well with DTMLFile methods).

On the first viewing of the page, everything works fine --
images come up as expected.

However, if after the page loads in Netscape, I use
"shift-reload" to reload all the images, ALL of the images
loaded this way come up broken.

Alternatively, if I used "view image" on the images,
the browser hangs, and I eventually get "document
contained no data". This behavior continues for additional
attempts. Only after shutting down netscape and waiting
for awhile does it work again (a day is certainly long
enough, but five minutes may not be -- I haven't
systematically tested to figure out how long I have to
wait). Obviously that's unacceptable in practice!

Any ideas about what could be going wrong?

The reason these are loaded like this is so that I can
use these for buttons and things without having to
clutter up the instance space in the ZMI. They need
to be accessible by URL, but don't need to show up
in folder listing (I'd prefer that they didn't). Is
there a better/safer way to do that?

Thanks,
Terry

-- 
------------------------------------------------------
Terry Hancock
hancock@anansispaceworks.com       
Anansi Spaceworks                 
http://www.anansispaceworks.com 
P.O. Box 60583                     
Pasadena, CA 91116-6583
------------------------------------------------------