Number of records found by validate in .TAB file does not match number of lines #518
-
Hello, I am validating a label and its data file with the following command:
I don't understand the error: Since the data file contains 944 lines. I am attaching the tested label and data file: Archive.zip Can you help me with that issue ? Thanks, Thomas |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments 8 replies
-
I imagine this is triggered because the record length is wrong. If you fix the record length, you start to see other bugs in the label (incorrect field offsets etc.). |
Beta Was this translation helpful? Give feedback.
-
I think this may be the issue. Validate should probably throw an error that the record length is wrong instead, but I think the record count error gets thrown first and then jumps out of the checks. Here are a couple quirks of how the PDS DSV is defined:
So I think what may be happening is a few records are too long, validate is then reading past the expected CRLF for that record, and then reads all the way to the next CRLF and then throws everything off. A quick awk execution (which I think works?) shows there are a few lines that are off:
|
Beta Was this translation helpful? Give feedback.
-
Thanks @msbentley and @jordanpadams I was able to make validate happy with my file, then I am happy too ! I had a few formatting issues which made the tab file to have inconsistent line lengths. I could have spotted that visually since all the columns were not aligned as they were supposed to but I missed it. Thanks again, |
Beta Was this translation helpful? Give feedback.
-
That would be great - this is one of those cases that you think there is just one error, but squash it and realise there are a bunch more hidden under the surface |
Beta Was this translation helpful? Give feedback.
-
@tloubrieu-jpl opening and inspecting this with PDS4 Viewer may help as well. |
Beta Was this translation helpful? Give feedback.
-
@jordanpadams what is the expected error for the line length issue? I may need some help finding it in my output. |
Beta Was this translation helpful? Give feedback.
I imagine this is triggered because the record length is wrong. If you fix the record length, you start to see other bugs in the label (incorrect field offsets etc.).