[Zope] Problem refreshing a python product

Farrell, Troy troy.farrell@wilcom.com
Mon, 12 Mar 2001 16:01:41 -0600


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.

Thanks again.
Troy

-----Original Message-----
From: Jim Washington [mailto:jwashin@vt.edu]
Sent: Monday, March 12, 2001 2:55 PM
To: Farrell, Troy
Cc: 'zope@zope.org'
Subject: Re: [Zope] Problem refreshing a python product


Delete it also from the Products folder in the Control_Panel, then
restart/refresh.

-- Jim Washington

"Farrell, Troy" wrote:
> 
> I'm back :)
> 
> I'm having a problem with Zope not refreshing my python products.  I have
a
> broken product that I'm writing and I can't convince zope to refresh and
> reread the product code.
> I've tried restarting, shutting down and starting again, and the Refresh
> product.  I've deleted .pyc files and it still shows the same traceback.
> The traceback still shows a line of code that I've removed from the
product.
> At this point, I'll try almost anything.
>