Error Value: not all arguments converted
I'm traying to convert variables that I recieve from a JavaScript tu ISO date format using: <dtml-var Arrival fmt=ISO> <dtml-var Departure fmt=ISO> This Dates will be then used to send an SQL request to a database so I use: <dtml-in expr="Disponibilidad_cal (fechain=Arrival, fechaout=Departure)"> And allways shows same error: Zope has encountered an error while publishing this resource. Error Type: TypeError Error Value: not all arguments converted -------------------------------------------------------------------------------- Troubleshooting Suggestions The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page. If the error persists please contact the site maintainer. Thank you for your patience. I have no idea of what am I doing wrong, can anybody help me? Thanks _________________________________________________________________ Consigue aquí las mejores y mas recientes ofertas de trabajo en América Latina y USA: www.yupimsn.com/empleos
Alexander Alvarado wrote:
I'm traying to convert variables that I recieve from a JavaScript tu ISO date format using:
<dtml-var Arrival fmt=ISO> <dtml-var Departure fmt=ISO>
This Dates will be then used to send an SQL request to a database so I use:
<dtml-in expr="Disponibilidad_cal (fechain=Arrival, fechaout=Departure)">
And allways shows same error:
Zope has encountered an error while publishing this resource.
Error Type: TypeError Error Value: not all arguments converted
--------------------------------------------------------------------------------
Troubleshooting Suggestions
The URL may be incorrect. The parameters passed to this resource may be incorrect. A resource that this resource relies on may be encountering an error. For more detailed information about the error, please refer to the HTML source for this page.
If the error persists please contact the site maintainer. Thank you for your patience.
I have no idea of what am I doing wrong, can anybody help me?
Generically, that error message means that you're passing the database more variables than it expects. So... are you sure that your query is expecting both of those? -- Nick Arnett Phone/fax: (408) 904-7198 narnett@senti-metrics.com
Alexander Alvarado wrote at 2003-9-9 23:52 +0000:
I'm traying to convert variables that I recieve from a JavaScript tu ISO date format using:
<dtml-var Arrival fmt=ISO> <dtml-var Departure fmt=ISO>
Almost surely, "Arrival" and "Departure" are strings and not "DateTime" objects. Unlike "DateTime" objects, strings do not have an "ISO" method. Therefore, "ISO" is interpreted as a (C) format string. As it does not contain format specifiers ("%spec"), it is unable to convert the argument. You find details about the "fmt" attribute in <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html> Your problem will go away when "Arrival" (and friends) are "DateTime" objects. Depending on their format, you may be able to use: <dtml-var expr="ZopeTime(Arrival)" fmt=ISO> Dieter
participants (4)
-
Alexander Alvarado -
Chris Withers -
Dieter Maurer -
Nick Arnett