[chandler-users] [possible bug] Problem with ICS file import
Peter Novak
peter.novak at tu-clausthal.de
Fri May 30 00:47:49 PDT 2008
Dear Jeffrey and Andre,
thank you very much for your feedback.
> As it turns out, this is not valid iCalendar.
I see now. Well, there's no good way to check whether something is a
valid iCalendar, or not since the only on-line validator is, as you say,
too benevolent and all the other language parsers process the stuff
without a problem. This is quite frustrating, isn't it?
> Historically, Palm used VCALENDAR 1.0 (iCalendar is VCALENDAR 2.0).
> This looks like a VCALENDAR 1.0 file that just had its version tweaked.
>
> Specifically, in iCalendar, a UID is required for every VEVENT, and
> there aren't any in this file. Seems like a bug in DIMEX's conversion
> routine.
>
> Probably Chandler's iCalendar import code ought to be tweaked to handle
> old vCalendar data.
I would rather suggest to implement an extremely benevolent iCalendar
parser for any PIM tool which really would require only a very core
subset of entries to be filled correctly.
Another suggestion would be to better report (at least in the logging
window, if not the import dialog) the cause of problems. I do not mean a
complete diagnostics, but at least a line number in the imported file in
which the error occurred would help a lot with debugging and
investigating what might be wrong with my data. With the current
reporting, I am left in dark regarding my data. Even the import progress
bar went to approx. 30% and it takes several seconds to process the
file, so I think the problem is actually somewhere later in the file
(guess)...
> In the mean time, you probably want to just add random (but different)
> UIDs to your VEVENTs. vobject does this automatically when serializing
> iCalendar; so with a Python that has vobject installed (Chandler's
> version of Python does) you could do:
>
> >>>import vobject old = file('filename.ics')
> >>> new = file('new.ics', 'wb')
> >>> calendar = vobject.readOne(old)
> >>> calendar.serialize(new)
> >>>new.close()
Thanks. I will give it a try. Actually I did the same in Ruby/icalendar
gem and I am attaching the resulting file (which has UID filled!). But
that cannot be imported to Chandler either, though the reason is a bit
different (anyway I am in dark regarding the actual reason - is the FREQ
field somehow wrong?).
The traceback from the log window is as follows:
---------------------------------------
2008-05-30 09:31:47,430 twisted WARNING: C:\Program
Files\Chandler0.7.6\release\bin\lib\site-packages\twisted\python\failure.py:259:
exceptions.DeprecationWarning: raising a string exception is deprecated
2008-05-30 09:31:47,470 application.dialogs.ImportExport ERROR: Failed
importFile E:\users\pno\home\tmp\results.ics
Traceback (most recent call last):
File "C:\Program
Files\Chandler0.7.6\parcels\osaf\sharing\ICalendar.py", line 1048, in
importICalendarFile
activity=activity)
File "C:\Program
Files\Chandler0.7.6\parcels\osaf\sharing\stateless.py", line 61, in
importFile
trans.importRecords(filter(rs))
File "C:\Program Files\Chandler0.7.6\parcels\osaf\sharing\eim.py",
line 929, in importRecords
self.importRecord(r)
File "C:\Program Files\Chandler0.7.6\parcels\osaf\sharing\eim.py",
line 938, in importRecord
if self.failure: self.failure.raiseException()
File "C:\Program
Files\Chandler0.7.6\release\bin\lib\site-packages\twisted\python\failure.py",
line 259, in raiseException
raise self.type, self.value, self.tb
invalid 'FREQ': DAILY\
---------------------------------------
So does this mean that even the Ruby serialization routine is broken? I
mean what should I do if there's no single correct implementation of
this funny format as it seems...
> >According to iCalendar validator
> >(http://severinghaus.org/projects/icv/) the file is a valid ICS.
>
> Yeah, "validator" is a misnomer there. It tests whether ical4j parses a
> file, which is helpful but not really validation.
I see, but again: what is a standard worth if there's no single correct
parser? Java parser and Ruby parser handle the file, yet it is
incorrect? If I were not a programmer, this would be a turning point for
not using a software which does not cooperate. I am sorry to say this,
but it is simple as that for laymen :-(. But don't worry, I am still
willing to get this through in Chandler :-)
Thanks for your friendly assistance.
best,
Peter.
P.S.
I am now subscribed to the list, so the Cc is not necessary any more...
--
peter.novak at tu-clausthal.de | http://cig.in.tu-clausthal.de/
Department of Informatics | Clausthal University of Technology
Julius-Albert-Str. 4 | D-38678 Clausthal-Zellerfeld | Germany
Tel +49 5323 72 71 90 | Fax +49 5323 72 71 39
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.osafoundation.org/pipermail/chandler-users/attachments/20080530/12edbdf3/attachment.pgp
More information about the chandler-users
mailing list