Skip to content

Trailing white space causing syntax errors #7

@jcwong86

Description

@jcwong86

Using the current BART gtfs (http://bart.gov/dev/schedules/google_transit.zip), it happens to have two trailing white space lines in the stops table and the transfers table which causes script to stop uploading tables beyond there. When I deleted the white space it fixed the problem. I don't think most feeds have these trailing spaces, but maybe the program should end at the last full line.

These errors go away when the whitespace is deleted and the program is re-run...

BEGIN
ERROR:  missing data for column "stop_name"
CONTEXT:  COPY gtfs_stops, line 48: ""
ERROR:  current transaction is aborted, commands ignored until end of transaction block
invalid command \.
ERROR:  syntax error at or near "AirBART"
LINE 1: AirBART|AirBART|NULL|SHUTTLE|NULL|3|http://www.bart.gov/guid...
        ^
invalid command \.
ERROR:  syntax error at or near "WKDY"
LINE 1: WKDY|1|1|1|1|1|0|0|20120701|20140101
        ^
invalid command \.
ERROR:  syntax error at or near "SAT"
LINE 1: SAT|20120116|1
        ^
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions