[Vobject] vobject.base.ParseError:, need help
wujunbao at hotmail.com
wujunbao at hotmail.com
Sat Jan 5 19:59:14 CST 2008
I was trying to paser the following vcard text:
BEGIN:VCARD
VERSION:2.1
N;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:=E5=90=B4;=E5=86=9B=E4=BF=9D
TEL;CELL;HOME;X-MOT-RINGID=18446744073709551615;X-MOT-POSITION=1:13706308662
END:VCARD
and I got this error:
Traceback (most recent call last):
File "testov.py", line 10, in
card = vobject.readOne(text)
File "build/bdist.linux-i686/egg/vobject/base.py", line 1011, in readOne
File "build/bdist.linux-i686/egg/vobject/base.py", line 968, in readComponents
File "build/bdist.linux-i686/egg/vobject/base.py", line 845, in textLineToContentLine
File "build/bdist.linux-i686/egg/vobject/base.py", line 714, in parseLine
vobject.base.ParseError: At line 4: Failed to parse line: TEL;CELL;HOME;X-MOT-RINGID446744073709551615;X-MOT-POSITION=1:13706308662
The code i used is:
text = text.replace(';ENCODING=QUOTED-PRINTABLE','')
text = quopri.decodestring(text)
card = vobject.readOne(text)
What I want to get is the name in a vcard, can you help me?
Thank you.
_________________________________________________________________
天凉了,添衣了,心动了,“七件”了
http://get.live.cn
More information about the VObject
mailing list