← Back to team overview

c2c-oerpscenario team mailing list archive

[Bug 658126] Re: [trunk] caldav ics import - error handling year

 

I can send you the ics to a private address
pls see http://www.chricar.at/ChriCar/About.html

I tried to use Knowledge / Config / Calendar / Calendar -- Import ics
DTSTART:20110902T060000Z
DTSTART;TZID=Africa/Lagos:20100609T150000
DTSTART;TZID=Europe/Berlin:20091027T101000
DTSTART;TZID=Europe/Vienna:20101202T080000
DTSTART;TZID=Europe/Vienna:20101202T080000
DTSTART;TZID=W. Europe Standard Time:20100913T100000
DTSTART;VALUE=DATE:19570703
DTSTART;VALUE=DATE:19570703
DTSTART;VALUE=DATE:-4713010 

pls look at the last line 
it does not look like a date field 


after removing this entry

Last revision No. & ID :1693 tfr@xxxxxxxxxxx-20101117074930-7hi1np3oyksp6qel
Traceback (most recent call last):
  File "/home2/gass/OpenERP/trunk/openobject-server/bin/netsvc.py", line 489, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/home2/gass/OpenERP/trunk/openobject-server/bin/service/web_services.py", line 586, in dispatch
    res = fn(db, uid, *params)
  File "/home2/gass/OpenERP/trunk/openobject-server/bin/osv/osv.py", line 57, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home2/gass/OpenERP/trunk/openobject-server/bin/osv/osv.py", line 140, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home2/gass/OpenERP/trunk/openobject-server/bin/osv/osv.py", line 130, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home2/gass/OpenERP/trunk/openobject-server/bin/addons/caldav/wizard/calendar_event_import.py", line 59, in process_imp_ics
    vals = model_obj.import_cal(cr, uid, base64.decodestring(data['file_path']), context['active_id'], context)
  File "/home2/gass/OpenERP/trunk/openobject-server/bin/addons/caldav/calendar.py", line 707, in import_cal
    val = self.parse_ics(cr, uid, child, cal_children=cal_children, context=context)
  File "/home2/gass/OpenERP/trunk/openobject-server/bin/addons/caldav/calendar.py", line 325, in parse_ics
    vals = alarm.import_cal(cr, uid, cal_data, context=ctx)
  File "/home2/gass/OpenERP/trunk/openobject-server/bin/addons/caldav/calendar.py", line 1169, in import_cal
    seconds = child.value.seconds
AttributeError: 'datetime.datetime' object has no attribute 'seconds'

-- 
[trunk] caldav ics import - error handling year
https://bugs.launchpad.net/bugs/658126
You received this bug notification because you are a member of C2C
OERPScenario, which is subscribed to the OpenERP Project Group.

Status in OpenObject Addons Modules: Incomplete

Bug description:
System : Linux-2.6.34.7-0.3-desktop-x86_64-with-SuSE-11.3-x86_64
OS Name : posix
LSB Version:	core-2.0-noarch:core-3.2-noarch:core-4.0-noarch:core-2.0-x86_64:core-3.2-x86_64:core-4.0-x86_64:desktop-4.0-amd64:desktop-4.0-noarch:graphics-2.0-amd64:graphics-2.0-noarch:graphics-3.2-amd64:graphics-3.2-noarch:graphics-4.0-amd64:graphics-4.0-noarch
Distributor ID:	SUSE LINUX
Description:	openSUSE 11.3 (x86_64)
Release:	11.3
Codename:	n/a
Operating System Release : 2.6.34.7-0.3-desktop
Operating System Version : #1 SMP PREEMPT 2010-09-20 15:27:38 +0200
Operating System Architecture : 64bit
Operating System Locale : en_US.UTF8
Python Version : 2.6.5
OpenERP-Client Version : 6.0dev
Last revision No. & ID :1593 nch@xxxxxxxxxxx-20101006141335-uwtoanvnsnkgf5xx
Traceback (most recent call last):
  File "/home2/gass/OpenERP/trunk/openobject-server/bin/netsvc.py", line 481, in dispatch
    result = ExportService.getService(service_name).dispatch(method, auth, params)
  File "/home2/gass/OpenERP/trunk/openobject-server/bin/service/web_services.py", line 586, in dispatch
    res = fn(db, uid, *params)
  File "/home2/gass/OpenERP/trunk/openobject-server/bin/osv/osv.py", line 57, in wrapper
    return f(self, dbname, *args, **kwargs)
  File "/home2/gass/OpenERP/trunk/openobject-server/bin/osv/osv.py", line 140, in execute
    res = pool.execute_cr(cr, uid, obj, method, *args, **kw)
  File "/home2/gass/OpenERP/trunk/openobject-server/bin/osv/osv.py", line 130, in execute_cr
    return getattr(object, method)(cr, uid, *args, **kw)
  File "/home2/gass/OpenERP/trunk/openobject-server/bin/addons/caldav/wizard/calendar_event_import.py", line 54, in process_imp_ics
    vals = model_obj.import_cal(cr, uid, base64.decodestring(data['file_path']), context['active_id'], context)
  File "/home2/gass/OpenERP/trunk/openobject-server/bin/addons/caldav/calendar.py", line 652, in import_cal
    parsedCal = vobject.readOne(ical_data)
  File "/usr/lib/python2.6/site-packages/vobject/base.py", line 1078, in readOne
    ignoreUnreadable, allowQP).next()
  File "/usr/lib/python2.6/site-packages/vobject/base.py", line 1055, in readComponents
    if transform: component.transformChildrenToNative()
  File "/usr/lib/python2.6/site-packages/vobject/base.py", line 600, in transformChildrenToNative
    childArray[i].transformChildrenToNative()
  File "/usr/lib/python2.6/site-packages/vobject/base.py", line 599, in transformChildrenToNative
    childArray[i]=childArray[i].transformToNative()
  File "/usr/lib/python2.6/site-packages/vobject/base.py", line 122, in transformToNative
    return self.behavior.transformToNative(self)
  File "/usr/lib/python2.6/site-packages/vobject/icalendar.py", line 697, in transformToNative
    obj.value=parseDtstart(obj, allowSignatureMismatch=True)
  File "/usr/lib/python2.6/site-packages/vobject/icalendar.py", line 1810, in parseDtstart
    return stringToDate(contentline.value)
  File "/usr/lib/python2.6/site-packages/vobject/icalendar.py", line 1589, in stringToDate
    year  = int( s[0:4] )
ParseError: At line 11955: In transformToNative, unhandled exception: <type 'exceptions.ValueError'>: invalid literal for int() with base 10: 'DTST'

I only found the following strings containing DTST in the ics file to import
DTSTART, DTSTAMP