ParserError parsing vcard string where ORG attribute contains a comma ","
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-vobject (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: python-vobject
I'm using ubuntu 10.10 with python-vobject Version: 0.8.1c-3
I was parsing all the vcard files from evolution using python-evolution. I discovered that some of my entries had an ORG value with an embedded comma.
I was able to trigger the problem with this example vcard.
vobject.
with the version in the ubuntu repository I get the stack trace.
Traceback (most recent call last):
File "abeds.py", line 179, in <module>
sys.
File "abeds.py", line 34, in main
foaf([])
File "abeds.py", line 48, in foaf
vc_contact = vobject.
File "/usr/lib/
ignoreUnrea
File "/usr/lib/
if transform: component.
File "/usr/lib/
childArray[
File "/usr/lib/
return self.behavior.
File "/usr/lib/
obj.value = splitFields(
File "/usr/lib/
stringToTex
File "/usr/lib/
raise ParseError("error: illegal escape sequence: '\\%s'" % (char,))
vobject.
with the native version in the package before patches are applied I get:
print vobject.
<VCARD| [<VERSION{}3.0>, <FN{}fn>, <N{} n >, <ORG{}[u'Name, A&B.']>]>
which is what was expecting (or at least hoping would happen)
This problem is introduced by commenting out the "leave characters in for later passes" append and adding the exception.
introduced by debian/
If I put the current.append back in and remove the raise error, the parser does read all my vcards.
I'm not sure what breaks elsewhere though.
Thanks, Diane
This bug has been fixed in the debian package:
http:// bugs.debian. org/cgi- bin/bugreport. cgi?bug= 569273# 25
Hopefully we can get this changed issued for the ubuntu package.