[Zope] System Error from Zope Book Example

Chris McDonough chrism@zope.com
Mon, 18 Feb 2002 17:06:09 -0500


> Nothing ever prints. Not sure where it _would_ print. But the error
persists.

Sorry, that's my fault.  Start Zope up from a console.  make sure the "-D"
(debug mode) switch is on when you start it up.  Things get printed out to
the console when Zope starts up and print statements cause output to go to
the console as well.

> It's obvious to me either that I just don't get something fundamental
> about Zope and how it deals with scripts and External Methods or
> there's some kind of major flaw in the scripts in the Zope Book that
> I am too inexperienced to dope out.

Either is possible.  It's my opinion that one of the images that you're
iterating over does not have the right kind of "data" attribute.  The
failure, in other words, is a function of the content.

> The earlier error I reported (bad argument to internal function)
> disappeared when I deleted the JPEG it was processing at the time.
> Must have been something wrong with it, though it displayed just fine.

Yup, ok, that sounds right.

> The thing is, the scripts I'm talking about actually run. They create
> the thumbnail(s). Then they cause an error. The new error (which is
> the second one I reported last week) says that I'm trying to download
> a CGI application. This error arises _after_ the thumbnails are
> created.

So the problem that started this thread has gone away and now you have
another one?

> i'm going to test with a small, known-working external script later
> today and see if this is a config problem of some sort. But I've
> already concluded one thing: external scripts are too hard to use
> because there's no way to debug them.

If you start in debug mode and judiciously use print statements or logging
calls, they're not too hard to debug.  Additionally, unless you want to
write a Product, they're just about the only way to do things that require
subversion of the security machinery.  I wouldn't give up on them so fast.
See also http://www.zope.org/Documentation/ZDG/TestingAndDebugging.stx .

- C