[Zope] Problem with zopetime
Morten W. Petersen
mpeters@online.no
Sat, 02 Oct 1999 14:17:38 +0200
This piece of code:
<!--#if add_piece-->
<!--#in "sql_methods.select.hol_piece_next_id()"-->
<!--#call "REQUEST.set('hol_piece_next_id',hol_piece_next_id)"-->
<!--#/in-->
<!--#call
"REQUEST.set('hol_piece_starttimeperiod',_.int(ZopeTime(_.int(hol_piece_stp_year),
_.int(hol_piece_stp_month),_.int(hol_piece_stp_day),0,0,0,timezone)))"-->
<!--#call
"REQUEST.set('hol_piece_endtimeperiod',ZopeTime(hol_piece_etp_year,
hol_piece_etp_month,hol_piece_etp_day,0,0,0,timezone))"-->
<!--#call "sql_methods.insert.hol_piece(REQUEST)"-->
<!--#/if-->
Gives me this traceback:
<FROM REQUEST>
form:
hol_piece_title: 'asdfasdf'
hol_piece_etp_day: '1'
add_piece: 'Add Piece'
hol_piece_stp_day: '1'
hol_piece_etp_year: '1990'
hol_piece_status: '0'
hol_piece_etp_month: '1'
hol_piece_creator: '1'
hol_piece_stp_year: '1990'
hol_piece_stp_month: '1'
</FROM REQUEST>
<!--
Error type:
Error value: not all arguments converted
-->
<!--
Traceback (innermost last):
File /home/morphex/Zope/lib/python/ZPublisher/Publish.py, line 878, in
publish_module
File /home/morphex/Zope/lib/python/ZPublisher/Publish.py, line 590, in
publish
(Info: /Linoo/system/hol/piece_add)
File /home/morphex/Zope/lib/python/OFS/DTMLDocument.py, line 213, in
__call__
(Object: piece_add)
File /home/morphex/Zope/lib/python/OFS/DTMLDocument.py, line 209, in
__call__
(Object: piece_add)
File /home/morphex/Zope/lib/python/DocumentTemplate/DT_String.py, line
513, in __call__
(Object: piece_add)
File /home/morphex/Zope/lib/python/DocumentTemplate/DT_Util.py, line
266, in eval
(Object:
REQUEST.set('hol_piece_endtimeperiod',ZopeTime(hol_piece_etp_year,
hol_piece_etp_month,hol_piece_etp_day,0,0,0,timezone)))
File <string>, line 0, in ?
File /home/morphex/Zope/lib/python/OFS/Application.py, line 279, in
PrincipiaTime
(Object: ApplicationDefaultPermissions)
File /home/morphex/Zope/lib/python/DateTime/DateTime.py, line 565, in
__init__
TypeError: (see above)
-->
Grr, I'm gonna smash my computer soon! ;(
"Thanks in advance"