l0b0 / vcard

vCard 3 validator, class and utility functions
https://gitlab.com/victor-engmark/vcard
GNU General Public License v3.0
34 stars 8 forks source link

ERROR: “Could not process entire <file> - ## lines remain” #5

Open Zearin opened 11 years ago

Zearin commented 11 years ago

I keep getting this error, and it’s quite baffling. The ## lines remain seems to equal the number of lines in the file—as if to say, “Could not process entire , ALL lines remain”.

I would love to be able to use this validation feature! Please let me know what I can do to help fix this bug.

l0b0 commented 11 years ago

It can happen for several reasons, including:

The validator is rather strict, since it was developed to detect rather minor problems with almost valid vCards. But yeah, the message should be clearer.

If none of these apply, please link to the file.

Zearin commented 11 years ago

Nope:

Zearin commented 11 years ago

I’ve tested this using both:

The personal project I’m working on is actually the reason I discovered this project. I wanted a way to validate the VCards my code is generating.

Unfortunately, I keep getting this error. And AFAIK, OS X conforms to the VCard standard; any OS X-specific functionality is accomplished via the official X-<PROPERTY> extensibility mechanism.

Could you help me pinpoint the source of this?

l0b0 commented 11 years ago

I'll need an actual file for this. But I don't think I've found any software yet which actually conforms to the vCard standard completely.

Zearin commented 11 years ago

VCard for testing Out of respect for the privacy of the people whose information is contained in the VCards, I can’t post them on GitHub. Instead, I’ll create a “dummy” VCard in OS X’s Contacts, verify that I get the same error, and send that to you.

What went wrong? One of the most frustrating things about this error is that it doesn’t tell me where the validation process fails. I can see from your source code that you have a very detailed list of error messages that would be helpful if the validation failed within the errors defined in vcard_defs.py. If I were getting one of these errors, then I would have some direction on what to fix…

But I just get the generic error mentioned earlier. Is it possible that this generic error is causing the program to exit prematurely, preventing me from receiving a more helpful error message?

Zearin commented 11 years ago

PROGRESS! :)

It looks like one source of errors is the presence of the IMPP VCard property. This property is not defined in the VCard 3.0 spec; rather, it is found in RFC4770.

Since Instant Messaging is a pretty common thing found in VCards, can I request support for the RFC4770 extensions to VCard?

l0b0 commented 11 years ago

Nice debugging, but it really should give you a more useful error message if the problem is an unknown vCard property. Do you have an example anonymized vCard I can work with?

RFC4770 seems a very reasonable request for the validator. I'd just make sure to add support for it as a flag (for example --rfc4770 or --im-extensions) to keep the default of plain vCard 3.0 when running without flags. That way people can choose which feature set they want to use.

Zearin commented 11 years ago

Nice debugging, but it really should give you a more useful error message if the problem is an unknown vCard property. Do you have an example anonymized vCard I can work with?

Sure. Where do I send it?

RFC4770 seems a very reasonable request for the validator. I'd just make sure to add support for it as a flag (for example --rfc4770 or --im-extensions) to keep the default of plain vCard 3.0 when running without flags. That way people can choose which feature set they want to use.

Totally agreed. Separate RFCs should be modularized. ☺

l0b0 commented 11 years ago

Where do I send it?

Could you put it in the test directory of your repo with the other test files? That way, if it turns out to be a good example for a regression test, we can just keep it in the repo.

Zearin commented 11 years ago

Done!

I use the Git Flow branching style, so the test file has been added in an RFC 4770 feature branch.