Invalid Record Length
How to fix the Invalid Record Length: expected x, got y on line z error?
Last updated
How to fix the Invalid Record Length: expected x, got y on line z error?
Last updated
By default, Stockeo requires CSV files to have the same number of columns in every row. If the error message Invalid Record Length: expected x, got y on line z appears, it means that row z has a different number of columns than the previous rows.
Strict parsing of CSV files offers several advantages. For example, it helps prevent column misalignment when a product description contains a comma, but the value is not enclosed in quotes. This issue could lead to incorrect data mapping, such as mistakenly assigning the cost as the retail price if those fields are adjacent.
However, differences in the number of columns may still occur, often due to varying numbers of image URLs at the end of each row. The Ignore inconsistent number of columns checkbox lets you instruct the app to skip rows in the CSV file that don't match the column count of the header row. This is helpful when some rows have missing or additional data.