Skip to content
This repository has been archived by the owner on Jul 3, 2019. It is now read-only.

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

Open
Zearin opened this issue Oct 5, 2012 · 10 comments
Open

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

Zearin opened this issue Oct 5, 2012 · 10 comments

Comments

@Zearin
Copy link
Contributor

Zearin commented Oct 5, 2012

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
Copy link
Owner

l0b0 commented Oct 5, 2012

It can happen for several reasons, including:

  • The START:VCARD and/or END:VCARD lines are missing
  • The lines are separated by something other than DOS newlines (\r\n)
  • There is no empty line after the last vCard

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
Copy link
Contributor Author

Zearin commented Oct 6, 2012

Nope:

  • BEGIN:VCARD and END:VCARD are present
  • Lines are CRLF-terminated
  • There is an empty line after the last vCard

@Zearin
Copy link
Contributor Author

Zearin commented Oct 7, 2012

I’ve tested this using both:

  • VCards generated from a personal project I’m working on
  • VCards exported from Mac OS X Contacts (known as “Address Book” in pre-Mountain Lion OS X)

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
Copy link
Owner

l0b0 commented Oct 7, 2012

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
Copy link
Contributor Author

Zearin commented Oct 8, 2012

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
Copy link
Contributor Author

Zearin commented Oct 8, 2012

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
Copy link
Owner

l0b0 commented Oct 8, 2012

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
Copy link
Contributor Author

Zearin commented Oct 11, 2012

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
Copy link
Owner

l0b0 commented Oct 11, 2012

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
Copy link
Contributor Author

Zearin commented Oct 11, 2012

Done!

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants