You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/path/to/script.py", line 32, in <module>
print(vobject.readOne(el))
File "/home/volker/.local/lib/python3.9/site-packages/vobject/base.py", line 1155, in readOne
return next(readComponents(stream, validate, transform, ignoreUnreadable,
File "/home/volker/.local/lib/python3.9/site-packages/vobject/base.py", line 1101, in readComponents
vline = textLineToContentLine(line, n)
File "/home/volker/.local/lib/python3.9/site-packages/vobject/base.py", line 925, in textLineToContentLine
return ContentLine(*parseLine(text, n), **{'encoded': True,
File "/home/volker/.local/lib/python3.9/site-packages/vobject/base.py", line 813, in parseLine
raise ParseError("Failed to parse line: {0!s}".format(line), lineNumber)
vobject.base.ParseError: At line 7: Failed to parse line: =45=50;;;
The text was updated successfully, but these errors were encountered:
instead of waiting for the library to be fixed...
Seems most/android phone exporters split long lines (>115) this way - ending on '=' then next line starts with '='. Most non-ascii names hit this limit easily.
newvcardtext = vcardtext.replace( '=\n=', '=')
works fine joining them back; use on single vcard or over whole vcf file/text, before parsing with vobject.
This code:
fails with the message
The text was updated successfully, but these errors were encountered: