[Zope] Python Product doesn't appear in Products list in Control
Panel
Terry Hancock
hancock@anansispaceworks.com
Tue, 18 Jun 2002 14:31:49 -0700
> From: Richard Jones <rjones@ekit-inc.com>
>
> On Wed, 19 Jun 2002 09:44, Richard Jones wrote:
> > On Tue, 18 Jun 2002 21:52, Jens Vagelpohl wrote:
> > > if there are any errors that occur during the processing of your
> > > initialize method they might get swallowed up completely.
> >
> > I thought of that too, and nope, no exceptions are being raised and
> > swallowed.
> >
> > I also thought "hey, it's Zope, maybe it'll just magically get better
> > overnight" but no go. It's still broken. My product refuses to appear in
> > the products list. :(
>
> Freaky - it's appearing in the Add menu now (wasn't yesterday). Some of the
> tweaking I did this morning must've paid off. Still doesn't appear in the
> Products listing, but at least I can actually use it.
Two thoughts:
1) Is this a suspect version of Python+Zope? I had a lot
of problems of this general nature with Python 2.1.1 + Zope 2.4.3,
and when I asked on list I was told this might be the problem.
I haven't been using Python 2.1.3 + Zope 2.5.1 long enough to
be sure, but it does *seem* to have made some of these problems go
away.
2) Writing __init__.py is a wee bit picky. Have you done this
before so that you know you're doing it right? (Have given
all the arguments to the context.registerClass() calls, etc?)
Did you import the module that the object is defined in into
__init__.py? Hmm. Does the name in __init__.py agree with
the name in the original module? (I had some objects disappear
without generating any traceback when I renamed one of them).
Of course, that wouldn't seem to account for the product
being missing. Does everything have a docstring? I've been
bitten by that requirement a few times. I notice my
initialize function has one -- I can't remember what happens
if it doesn't, though.
Terry
--
------------------------------------------------------
Terry Hancock
hancock@anansispaceworks.com
Anansi Spaceworks
http://www.anansispaceworks.com
P.O. Box 60583
Pasadena, CA 91116-6583
------------------------------------------------------