[Zope] Zope 2.x bug in loading products
Ross Boylan
RossBoylan@stanfordalumni.org
Wed, 24 Nov 1999 13:15:16 -0800
I believe the problem I had was also caused by a silent failure in
__init__.py.
When registering a class you need to provide a tuple of methods to create
it. I provided only 1, so the (method) became a method, not a tuple. I
noticed this because I tried the same thing with some other code for
__init__.py that did error trapping and caught it. The fix, by the way, is
to use (method, ) syntax.
Because this is intimately tied to python's module mechanism, it may be hard
to trap the errors at a higher level. If not, I hope the product manager
can be changed to do the right thing and log failures in __init__.py.
> -----Original Message-----
> From: Mike Pelletier [mailto:mike@digicool.com]
> Sent: Tuesday, November 23, 1999 7:12 AM
> To: zope@zope.org; Ross Boylan
> Subject: Re: [Zope] Zope 2.x bug in loading products
>
>
>
> I thought I noticed the same thing happening-- a syntax error in
> MyProduct.py causes my Product to show up Broken. I fix it, but
> the Product
> _still_ shows up as broken with the old error message. The
> problem was that
> I _also_ had an error in my __init__.py's initialize method, which fails
> silently(?). Once I noticed and fixed that, I was on the road again.
>
> Mike.
>