[Zope] Problem refreshing a python product

Farrell, Troy troy.farrell@wilcom.com
Tue, 13 Mar 2001 08:45:50 -0600


Thanks for all the advice.  I found the problem with the -D flag.  Line 10
in __init__.py was:

     contructors = (

Should have been:

     constructors = (

Oops.  Thanks for all the suggestions.  I'm sure they'll come in handy in
the future :)  By the way, line 30 in ZProductManager.py didn't exist,
though the product said that was the problem.  Those blasted constructors
can be really useful sometimes :)

Thanks again,
Troy

-----Original Message-----
From: Phillip Crumpler [mailto:phillip@crumpler.com.au]
Sent: Tuesday, March 13, 2001 7:45 AM
To: Jim Washington; troy.farrell@wilcom.com
Subject: RE: [Zope] Problem refreshing a python product


It may be the formatting of the email, but could line 30 possibly begin in
column 6? It might point to the line being indented one space too many...

cheers

Phillip

ps: Sorry if this sounds like a 'are you sure it's plugged in' kind of
answer, but it is better to get one of those answers when you don't need it
that vice-versa =)

> -----Original Message-----
> From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of Jim
> Washington
> Sent: Wednesday, 14 March 2001 12:19 AM
> To: Farrell, Troy
> Cc: 'zope@zope.org'
> Subject: Re: [Zope] Problem refreshing a python product
>
>
> Hi, Troy
>
> Assuming the traceback below is what you are getting now, I would look
> somewhere around line 30 in ZProductManager.py.  But that's just a
> guess.  Are you running Zope in debug mode?  (Look for -D in
> /home/zope/Zope-2.3.1b1-src/start).  Code problems with Products usually
> show up on the terminal where you start zope, if you are in debug mode.
>
> -- Jim Washington
>
> "Farrell, Troy" wrote:
> >
> > Ok.  Did that and deleted the pyc's.  Now the Product isn't
> showing up on
> > the product page.  If I undelete it, it keeps the same traceback.
> >
> > Debug:
> > Zope version: Zope 2.3.1b1 (source release, python 1.5.2, linux2)
> > Python version: 1.5.2 (#0, Apr 3 2000, 14:46:48) [GCC 2.95.2 20000313
> > (Debian GNU/Linux)]
> > System Platform: linux2
> > Process ID: 7707 (4101)
> > Running for: 3 min 23 sec
> >
> > Traceback:
> > Traceback (innermost last):
> >   File "/home/zope/Zope-2.3.1b1-src/lib/python/OFS/Application.py", line
> > 537, in import_products
> >     product=__import__(pname, global_dict, global_dict, silly)
> >   File
> "/home/zope/zope/lib/python/Products/ZProductManager/__init__.py",
> > line 2, in ?
> >     from ZProductManager import ZProductManager
> >   File
> >
> "/home/zope/zope/lib/python/Products/ZProductManager/ZProductManager.py",
> > line 30
> >      if REQUEST is not None:
> >       ^
> >  SyntaxError: invalid syntax
> >
> > I moved the product out of the zope directory structure and
> restarted.  It
> > was gone. Good.  I brought it back in and restarted and it
> isn't showing up.
> > That sounds like a problem in my __init__.py file.  It is below
> if you don't
> > mind looking it over:
> >
> > from ZProductManager import ZProductManager
> >
> > def initialize(context):
> >   """Initalize the ZProductManager product.
> >   This causes it to appear on the product list
> >   in the Zope installation."""
> >   context.registerClass(
> >     ZProductManager,
> >     contructors = (
> >       ZProductManager.manage_addZProductManagerForm, # The first method
> >                                                      # is called when
> > someone
> >                                                      # adds the product
> >       ZProductManager.manage_addZProductManager
> >
> >     )
> >   )
> >
> > If it helps, I'll send ZProductManager.py as well.