[Zope] calling manage_addProduct from ZClass method?

dedmundson@bigfoot.com dedmundson@bigfoot.com
Mon, 27 Aug 2001 15:17:46 GMT


I have the following hierarchy:

   - Products
       - GPScape (Product)
          - new_cell (Script)
          - Cell (ZClass)
              - split (method, Script)

I'm getting an error when my split method tries to execute:

  line 22:  gpscape = container.manage_addProduct(['GPScape'])  <<<<<< error
  line 23:  nw = gpscape.new_cell(container,'NW',cn,(cn+cs)/2,(cw+ce)/2,cw)

Here, container is an instance of Cell and I'm simply trying to
set gpscape as a convenience variable for future use, e.g., the
new_cell call in line 23.  Any idea why this is an error?

Cheers,
Darran.


---------------------------

Traceback (innermost last):
  File /home/ole/INSTALL/Zope-2.4.0-src/lib/python/ZPublisher/Publish.py, line 
223, in publish_module
  File /home/ole/INSTALL/Zope-2.4.0-src/lib/python/ZPublisher/Publish.py, line 
187, in publish
  File /home/ole/INSTALL/Zope-2.4.0-src/lib/python/Zope/__init__.py, line 226, 
in zpublisher_exception_hook
    (Object: LockableItem)
  File /home/ole/INSTALL/Zope-2.4.0-src/lib/python/ZPublisher/Publish.py, line 
171, in publish
  File /home/ole/INSTALL/Zope-2.4.0-src/lib/python/ZPublisher/mapply.py, line 
160, in mapply
    (Object: try_earth_split)
  File /home/ole/INSTALL/Zope-2.4.0-src/lib/python/ZPublisher/Publish.py, line 
112, in call_object
    (Object: try_earth_split)
  File /home/ole/INSTALL/Zope-2.4.0-
src/lib/python/Shared/DC/Scripts/Bindings.py, line 324, in __call__
    (Object: try_earth_split)
  File /home/ole/INSTALL/Zope-2.4.0-
src/lib/python/Shared/DC/Scripts/Bindings.py, line 354, in _bindAndExec
    (Object: try_earth_split)
  File /home/ole/INSTALL/Zope-2.4.0-
src/lib/python/Products/PythonScripts/PythonScript.py, line 363, in _exec
    (Object: try_earth_split)
    (Info: ({'script': <PythonScript instance at d0f010>, 'context': <Folder 
instance at ba73e8>, 'container': <Folder instance at 
ba73e8>, 'traverse_subpath': []}, (), {}, None))
  File Script (Python), line 1, in try_earth_split
    (Object: guarded_getattr)
  File /home/ole/INSTALL/Zope-2.4.0-
src/lib/python/Shared/DC/Scripts/Bindings.py, line 324, in __call__
    (Object: split)
  File /home/ole/INSTALL/Zope-2.4.0-
src/lib/python/Shared/DC/Scripts/Bindings.py, line 354, in _bindAndExec
    (Object: split)
  File /home/ole/INSTALL/Zope-2.4.0-
src/lib/python/Products/PythonScripts/PythonScript.py, line 363, in _exec
    (Object: split)
    (Info: ({'script': <PythonScript instance at fe6358>, 'context': <Cell 
instance at e0db48>, 'container': <Cell instance at 
e0db48>, 'traverse_subpath': []}, (), {}, None))
  File Script (Python), line 22, in split
    (Object: guarded_getattr)
AttributeError: (see above)


---------------------------------------------
This message was sent using Endymion MailMan.
http://www.endymion.com/products/mailman/