Re: 'startDate' attribute in appointment is not a date-value
Helge Hess <[email protected]>
| Newsgroups | gmane.comp.cms.opengroupware.xmlrpc.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Jonathon,
could you submit a bug report on this, so that the issue is not lost?
Since I can't see any problem with your example, something seems to be
mixed up.
Please attach a log of the problem with the xmlrpcd running with
"-WOHttpAdaptor_LogStream YES", so that we can see the actual XML being
transmitted.
Thanks,
Helge
On 08.09.2003, at 07:53, Jonathon Sim wrote:
> I'm writing a script (in Python) to import appointments from the
> PHPGroupware
> calendar into Ogo, and I'm getting this error ; as near as I can see :
> startDate IS a date-value (ie an xmlrpclib.DateTime object). Perhaps
> I'm
> getting the data format wrong or something??
>
> FYI heres the code snippet that causes it:
>
> for appt in calender:
> print appt['datetime']
> ogo_appt = {
> 'owner' : ogoAccount(ogoAccount(gw_logins[appt["owner"]])),
> 'startDate' : xmlrpclib.DateTime( appt['datetime']),
> 'endDate' : xmlrpclib.DateTime(appt['edatetime']),
> 'title' : appt['title'],
> 'location' : appt['location']
> }
>
> #Make appointments 1 hour by default
> if appt['edatetime'] == appt['datetime'] :
> ogo_appt['endDate'] = xmlrpclib.DateTime(appt['datetime'] + 60*60)
>
> print "-----------------------------------"
> pprint.pprint(ogo_appt)
> if not debug:
> print "+++Inserting"
> ogo_server.appointment.insert(ogo_appt)
>
> And more interestingly, heres the actual record this code is trying to
> insert:
> {'endDate': <DateTime 20020328T02:00:00 at 82effbc>,
> 'location': 'E-Center',
> 'owner': {'login': 'root', 'id': 'skyrix://pollux/ogo_dev/10000'},
> 'startDate': <DateTime 20020328T01:00:00 at 82f0364>,
> 'title': 'IMR Meeting'}
>
> In the logs I see:
> Sep 08 07:46:22 xmlrpcd [18415]: <>DirectAction>>D decoded XMLRPC call:
> <0x095FE87C[XmlRpcMethodCall]: method=appointment.insert #paras=1>
> Sep 08 07:46:22 xmlrpcd [18415]: <>DirectAction>>D WARNING: invalid
> start-date
> parameter: {
> value = "20020328T01:00:00";
> }(NSConcreteSingleObjectDictionary)
> Sep 08 07:46:22 xmlrpcd [18415]: >DirectAction> Fault[2] occured:
> 'startDate'
> attribute in appointment is not a date-value!
> 192.168.1.7 - - [08/Sep/2003:07:46:22 GMT] "POST /xmlrpc/ HTTP/1.0"
> 200 300
> 0.008 - - 0
>
> Does anyone have any ideas whats going on here? Is it a bug, or am I
> just
> overlooking something obvious?
>
> --
> Jonathon Sim <[email protected]> Developer/Network Administrator@Zeald Ltd
> JabberID: [email protected]
> --
>
> --
> OpenGroupware.org XML-RPC
> [email protected]
> http://mail.opengroupware.org/mailman/listinfo/xmlrpc
>
--
OpenGroupware.org
http://www.opengroupware.org/
--
OpenGroupware.org XML-RPC
[email protected]
http://mail.opengroupware.org/mailman/listinfo/xmlrpc