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 <sim@xxxxxxxxx> Developer/Network Administrator@Zeald Ltd
JabberID: sim@xxxxxxxxxx
--
--
OpenGroupware.org XML-RPC
xmlrpc@xxxxxxxxxxxxxxxxx
http://mail.opengroupware.org/mailman/listinfo/xmlrpc
|