ERRORGTFS Schedule notice

A CSV row has the wrong number of fields

invalid_row_length
Severity
ERROR
Files to check
See report
Report fields
4
Documentation
Curated

Diagnosis

What this notice means

The reported row's value count differs from the header's column count.

Operational effect

Why it matters

Values may fall under the wrong field names or the row may be rejected.

Scope

Files to check and report fields

Use the file or input resource identified in the report. Check the message and available context fields; runtime failures may not identify a GTFS row.

Report fieldTypeMeaning
csvRowNumberintegerThe row of the faulty record.
filenamestringThe name of the faulty file.
headerCountintegerThe number of column in the faulty file.
rowLengthintegerThe length of the faulty record.

Repair

How to fix it

  1. 1

    Compare rowLength with headerCount, then inspect the original row and header in filename.

  2. 2

    Quote embedded commas, repair broken quotes, and add or remove delimiters only where intended fields require them. Re-exporting with a CSV writer is safer than shifting cells by eye.

  3. 3
    Check the result

    After a repair, rebuild the archive and validate it again. Confirm that the affected records are correct and that no new related notices appeared. A reviewed warning or informational notice may remain when it describes intentional, supported data.

Re-check your feed in the browserFree, no upload for a file you pick.

Worked example

Example correction

The stop name includes a comma. Quote the complete field.

Before

stop_id,stop_name,stop_lat,stop_lon
S1,Central, Platform 2,35.17,33.36

After

stop_id,stop_name,stop_lat,stop_lon
S1,"Central, Platform 2",35.17,33.36

Illustrative excerpt, not a complete GTFS feed. Keep all other required records and fields.

Sources

References