[Vobject] [BUG] obj.serialize() fails on CATEGORIES component
Wilfredo Sánchez Vega
wsanchez at wsanchez.net
Wed Jan 11 11:48:52 CST 2006
The iCalendar data below is emitted by Mozilla Sunbird. vobject
parses this fine, but raises when it tries to serialize it.
I've narrowed this down to the CATEGORIES component. Apparently,
vobject keeps it's value in a list:
>>> children[11]
<CATEGORIES{}[u'Customer']>
(children is the list of children hanging off of the VEVENT
component.)
When you try to serialize it, it raises:
>>> children[11].serialize()
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/Users/wsanchez/Developer/Python/vobject/vobject/
vobject.py", line 159, in serialize
out = self.behavior.serialize(transformed, buf, lineLength)
File "/Users/wsanchez/Developer/Python/vobject/vobject/
behavior.py", line 129, in serialize
return vobject.defaultSerialize(obj, buf, lineLength)
File "/Users/wsanchez/Developer/Python/vobject/vobject/
vobject.py", line 673, in defaultSerialize
if obj.behavior and not startedEncoded: obj.behavior.encode
(obj)
File "/Users/wsanchez/Developer/Python/vobject/vobject/
icalendar.py", line 746, in encode
line.value = map(backslashEscape, line.value).join(',')
AttributeError: 'list' object has no attribute 'join'
-wsv
BEGIN:VCALENDAR
PRODID:-//Mozilla Calendar//NONSGML Sunbird//EN
VERSION:2.0
BEGIN:VEVENT
CREATED:20060111T165807Z
LAST-MODIFIED:20060111T165820Z
DTSTAMP:20060111T165807Z
UID:uuid1136998700639
SUMMARY:party
PRIORITY:0
STATUS:
CLASS:PUBLIC
DTSTART:20060111T100000
DTEND:20060111T110000
LOCATION:my pad
CATEGORIES:Customer
DESCRIPTION:woot!
END:VEVENT
END:VCALENDAR
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2746 bytes
Desc: not available
Url : http://lists.skyhouseconsulting.com/pipermail/vobject/attachments/20060111/f57fa5d6/smime.bin
More information about the VObject
mailing list