[Zope] sudden ZClass breakage

Kapil Thangavelu kthangavelu@earthlink.net
Thu, 05 Oct 2000 17:55:12 -0700


Timothy Wilson wrote:
> 
> Hi everyone,
> 
> I've been working away on a ZClass-based product that will provide a
> searchable job board for our Human Resources Dept. here at school. Things
> were going along fine until, it seemed, out of the blue I started getting an
> error message about an "Invalid Date-Time String" and a lengthy
> traceback. I'm wondering if anyone can glean anything from the
> traceback. Is this one of those obvious errors that I'm just missing? I'm
> really puzzled. Any advice would be appreciated. Here's the traceback:

You're trying to change the zclass properties after creating it but
you're not passing in a valid date time string and hence you're getting
this error. Make sure the string you're passing in conforms to a date
time format. (check ZOPE_HOME/lib/python/DateTime/DateTime.py for the
supported formats), or just cast it explicitly like <dtml-call
"REQUEST.set('date', DateTime('datestring'))">. I've noticed some
behavior earlier today where i change all my zclass properties in a
manage_changeProperties (depends on where) even ones not listed in the
request. if this is your problem and you don't have date_time string set
in the REQUEST you can try explicitly passing in a dummy date time
string (ZopeTime or distant past), or setting it to its default value, 

<dtml-with object>
<dtml-call "REQUEST.set('Date', date)">
</dtml-with>

i'd chuck this into the Collector/Tracker.

i'm sure others have good solutions.


> <!--
> Traceback (innermost last):
>   File /var/lib/zope/2.2.2/lib/python/ZPublisher/Publish.py, line 222, in
> publish_module
>   File /var/lib/zope/2.2.2/lib/python/ZPublisher/Publish.py, line 187, in
> publish
>   File /var/lib/zope/2.2.2/lib/python/Zope/__init__.py, line 221, in
> zpublisher_exception_hook
>     (Object: Traversable)
>   File /var/lib/zope/2.2.2/lib/python/ZPublisher/Publish.py, line 171, in
> publish
>   File /var/lib/zope/2.2.2/lib/python/ZPublisher/mapply.py, line 160, in
> mapply
>     (Object: entry_addProcessor)
>   File /var/lib/zope/2.2.2/lib/python/ZPublisher/Publish.py, line 112, in
> call_object
>     (Object: entry_addProcessor)
>   File /var/lib/zope/2.2.2/lib/python/OFS/DTMLMethod.py, line 172, in
> __call__
>     (Object: entry_addProcessor)
>   File /var/lib/zope/2.2.2/lib/python/DocumentTemplate/DT_String.py, line
> 528, in __call__
>     (Object: entry_addProcessor)
>   File /var/lib/zope/2.2.2/lib/python/DocumentTemplate/DT_With.py, line 146,
> in render
>     (Object: manage_addProduct['JobBoard'])
>   File /var/lib/zope/2.2.2/lib/python/DocumentTemplate/DT_Util.py, line 337,
> in eval
>     (Object: job_board_entry_add(_.None,_, NoRedir=1))
>     (Info: _)
>   File <string>, line 0, in ?
>   File /var/lib/zope/2.2.2/lib/python/OFS/DTMLMethod.py, line 168, in
> __call__
>     (Object: job_board_entry_add)
>   File /var/lib/zope/2.2.2/lib/python/DocumentTemplate/DT_String.py, line
> 528, in __call__
>     (Object: job_board_entry_add)
>   File /var/lib/zope/2.2.2/lib/python/DocumentTemplate/DT_With.py, line 146,
> in render
>     (Object: job_board_entry.createInObjectManager(REQUEST['jobID'],
> REQUEST))
>   File /var/lib/zope/2.2.2/lib/python/DocumentTemplate/DT_Util.py, line 337,
> in eval
>     (Object: propertysheets.entry_info.manage_editProperties(REQUEST))
>     (Info: REQUEST)
>   File <string>, line 0, in ?
>   File /var/lib/zope/2.2.2/lib/python/OFS/PropertySheets.py, line 458, in
> manage_editProperties
>     (Object: Traversable)
>   File /var/lib/zope/2.2.2/lib/python/OFS/PropertySheets.py, line 285, in
> _updateProperty
>     (Object: Traversable)
>   File /var/lib/zope/2.2.2/lib/python/ZPublisher/Converters.py, line 173, in
> field2date
>   File /var/lib/zope/2.2.2/lib/python/DateTime/DateTime.py, line 698, in
> __init__
> Invalid Date-Time String: (see above)
> 
> -->
> 
> -Tim
> 
> --
> Tim Wilson      | Visit Sibley online:         | Check out:
> Henry Sibley HS | http://www.isd197.k12.mn.us/ | http://www.zope.org/
> W. St. Paul, MN |                              | http://slashdot.org/
> wilson@visi.com |   <dtml-var pithy_quote>     | http://linux.com/
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )