-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeException in vcard_from_vobject #78
Comments
looks like vobject can't handle that vcard. I guess I'll wrap that function call and print failing vcards, so we might know what the problem is |
broken in a sense that vobject cannot parse them these cards won't get inserted into the db, but instead a warning is printed and, in debug mode, the whole vcard is printed. this should 'take care' of cases like gh #78 for now
could you check out pycarddav's develop branch, install it and try again? pycarddav should now print the vcard in case (and ignore it until next sync). You might want to paste the card (with all personal information redacted of course) or send it by email, so I can have a look at it. |
I took a deeper look at the problem and it was a comma in an Organization field. I don't know if it's legal or not in VCARD, but the field gets split by commas and then the seriealizer is not expecting a list instead of a string. I sent an e-mail to the vobject mailing list about it but is waiting to be approved. |
I believe ',' and ';' must be escaped with a backslash '' It would be nice if vobject would be a more forgiving. But since there seems to be hardly any development going on at vobject, I might switch to an icalendar based solution (if I find the time), since python 3 support would be awesome (which is not yet in icalendar, but they are working on it). |
not correctly escaped ',' might be an issue with VCards set up with owncloud owncloud/contacts#170 |
In BEGIN:VCARD
VERSION:3.0
UID:87452b8b1e
PRODID:-//ownCloud//NONSGML Contacts 0.2.5//EN
REV:2013-09-17T21:11:21+00:00
FN:Test Man
N:Man;Test;;;
ORG:Test, Org
END:VCARD I don't know if this is an owncloud problem or vobject (vobject doesn't seem to behave as it should anyway, it should handle malformed data with a graceful error, if owncloud is really sending wrong data). |
the RFC specifies that commas MUST be escaped, but you are right, vobject should at least handle that error more graceful (perhaps it can be configured to do that, I'll have to look into this) |
Hi.
Using pycarddav 0.5.1 from pip I get the following exception trying to sync an owncloud 5.0.10 installation:
I tried to re-add the except block removed in 4176b09#L0L681 but only got another exception:
I'm using Python 2.7.3 from Debian wheezy.
The text was updated successfully, but these errors were encountered: