[Zope] simple z-class problem
Ben Avery
ben@thesite.org
Fri, 05 Jul 2002 17:22:42 +0100
--------------040306080300090306040307
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
nope, wasn't that :)
I'm actually following the example from chapter 3 of Zope: Web
Application Development and Content Management.
the annoying thing is that I've tried it three times now, triple++
checked everything. and it's worked once, and failed twice.
zope wrote:
> i don't know if this will fix it, but you might try naming the product
> CalendarEvent and the class calendarEvent, so there is a distinct
> namespace between them.
> m
>
> -----Original Message-----
> *From:* zope-admin@zope.org [mailto:zope-admin@zope.org]*On Behalf
> Of* Ben Avery
> *Sent:* Friday, July 05, 2002 9:07 AM
> *To:* zope@zope.org
> *Subject:* [Zope] simple z-class problem
>
> 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?
>
--------------040306080300090306040307
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>
nope, wasn't that :)<br>
<br>
I'm actually following the example from chapter 3 of Zope: Web Application
Development and Content Management.<br>
the annoying thing is that I've tried it three times now, triple++ checked
everything. and it's worked once, and failed twice.<br>
<br>
<br>
zope wrote:<br>
<blockquote type="cite" cite="mid003601c2243f$65c760a0$0201a8c0@lala">
<title></title>
<meta content="MSHTML 5.50.4807.2300" name="GENERATOR">
<div><span class="828261616-05072002"><font face="Arial"
color="#0000ff" size="2">i don't know if this will fix it, but you might
try naming the product CalendarEvent and the class calendarEvent, so there
is a distinct namespace between them.</font></span></div>
<div><span class="828261616-05072002"><font face="Arial"
color="#0000ff" size="2">m</font></span></div>
<blockquote
style="border-left: 2px solid rgb(0,0,255); padding-left: 5px; margin-left: 5px;">
<div class="OutlookMessageHeader"><font face="Times New Roman"
size="2">-----Original Message-----<br>
<b>From:</b> <a class="moz-txt-link-abbreviated" href="mailto:zope-admin@zope.org">zope-admin@zope.org</a> [<a class="moz-txt-link-freetext" href="mailto:zope-admin@zope.org">mailto:zope-admin@zope.org</a>]<b>On
Behalf Of</b> Ben Avery<br>
<b>Sent:</b> Friday, July 05, 2002 9:07 AM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:zope@zope.org">zope@zope.org</a><br>
<b>Subject:</b> [Zope] simple z-class problem<br>
<br>
</font></div>
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: 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 <string>, 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>
</blockquote>
</blockquote>
<br>
</body>
</html>
--------------040306080300090306040307--