[Zope] simple z-class problem

Ben Avery ben@thesite.org
Fri, 05 Jul 2002 17:06:59 +0100


--------------080601020005060606020401
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi,

I'm having intermittent problems with the simplest z-class within a new 
product, through the ZMI.
I'm going through the stages of

1) I create a new product, CalendarEvent.
2) inside Test, I create a z-class, id: CalendarEvent.
3) inside this, I add some property sheet with some properties through 
the properties tab.
4) finally, I change the default view to propertysheets/Prop/manage from 
the dropdown list.

Now when I try to create an instance of it in a development folder, I 
get the constructor form, but then a NameError:
*Error Type: NameError*
*Error Value: global name 'CalendarEvent' is not defined*
trace below:

Traceback (innermost last):
  File /export/home/Zope-2.5.1/lib/python/ZPublisher/Publish.py, line 150, in publish_module
  File /export/home/Zope-2.5.1/lib/python/ZPublisher/Publish.py, line 114, in publish
  File /export/home/Zope-2.5.1/lib/python/Zope/__init__.py, line 159, in zpublisher_exception_hook
    (Object: CalendarEvent_factory)
  File /export/home/Zope-2.5.1/lib/python/ZPublisher/Publish.py, line 98, in publish
  File /export/home/Zope-2.5.1/lib/python/ZPublisher/mapply.py, line 88, in mapply
    (Object: CalendarEvent_add)
  File /export/home/Zope-2.5.1/lib/python/ZPublisher/Publish.py, line 39, in call_object
    (Object: CalendarEvent_add)
  File /export/home/Zope-2.5.1/lib/python/OFS/DTMLMethod.py, line 127, in __call__
    (Object: CalendarEvent_add)
  File /export/home/Zope-2.5.1/lib/python/DocumentTemplate/DT_String.py, line 473, in __call__
    (Object: CalendarEvent_add)
  File /export/home/Zope-2.5.1/lib/python/DocumentTemplate/DT_With.py, line 61, in render
    (Object: CalendarEvent.createInObjectManager(REQUEST['id'], REQUEST))
  File /export/home/Zope-2.5.1/lib/python/DocumentTemplate/DT_Util.py, line 159, in eval
    (Object: CalendarEvent.createInObjectManager(REQUEST['id'], REQUEST))
    (Info: REQUEST)
  File <string>, line 2, in f
NameError: (see above)


I have done this exact procedure before, with success. Now it doesn't 
work. I've rebooted the zope server.
I'm using Zope 2.5.1, Python 2.1.3 on Solaris 2.7.

Has anyone else seen this, or can anyone tell me what I'm doing wrong?

--------------080601020005060606020401
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body>
Hi,<br>
<br>
I'm having intermittent problems with the simplest z-class within a new product,
through the ZMI.<br>
I'm going through the stages of <br>
<br>
1) I create a new product, CalendarEvent.<br>
2) inside Test, I create a z-class, id:&nbsp;CalendarEvent.<br>
3) inside this, I add some property sheet with some properties through the
properties tab.<br>
4) finally, I change the default view to propertysheets/Prop/manage from
the dropdown list.<br>
<br>
Now when I try to create an instance of it in a development folder, I get
the constructor form, but then a NameError:<br>
   <strong>Error Type: NameError</strong><br>
   <strong>Error Value: global name 'CalendarEvent' is not defined</strong><br>
trace below:<br>
<pre>Traceback (innermost last):
  File /export/home/Zope-2.5.1/lib/python/ZPublisher/Publish.py, line 150, in publish_module
  File /export/home/Zope-2.5.1/lib/python/ZPublisher/Publish.py, line 114, in publish
  File /export/home/Zope-2.5.1/lib/python/Zope/__init__.py, line 159, in zpublisher_exception_hook
    (Object: CalendarEvent_factory)
  File /export/home/Zope-2.5.1/lib/python/ZPublisher/Publish.py, line 98, in publish
  File /export/home/Zope-2.5.1/lib/python/ZPublisher/mapply.py, line 88, in mapply
    (Object: CalendarEvent_add)
  File /export/home/Zope-2.5.1/lib/python/ZPublisher/Publish.py, line 39, in call_object
    (Object: CalendarEvent_add)
  File /export/home/Zope-2.5.1/lib/python/OFS/DTMLMethod.py, line 127, in __call__
    (Object: CalendarEvent_add)
  File /export/home/Zope-2.5.1/lib/python/DocumentTemplate/DT_String.py, line 473, in __call__
    (Object: CalendarEvent_add)
  File /export/home/Zope-2.5.1/lib/python/DocumentTemplate/DT_With.py, line 61, in render
    (Object: CalendarEvent.createInObjectManager(REQUEST['id'], REQUEST))
  File /export/home/Zope-2.5.1/lib/python/DocumentTemplate/DT_Util.py, line 159, in eval
    (Object: CalendarEvent.createInObjectManager(REQUEST['id'], REQUEST))
    (Info: REQUEST)
  File &lt;string&gt;, line 2, in f
NameError: (see above)

</pre>
I have done this exact procedure before, with success. Now it doesn't work.
I've rebooted the zope server.<br>
I'm using Zope 2.5.1, Python 2.1.3 on Solaris 2.7.<br>
<br>
Has anyone else seen this, or can anyone tell me what I'm doing wrong?<br>
</body>
</html>

--------------080601020005060606020401--