‘generate gtfs shapes’ errors

1211
4
Jump to solution
08-12-2019 02:13 PM
JackDrost
New Contributor III

Hello, I'm getting an error whenever I try to run any tool in the ‘generate gtfs shapes’ toolbox (from https://github.com/Esri/public-transit-tools/tree/master/generate-GTFS-shapes). The errors are:  "Error SQLizing the GTFS data.....sqlite3.ProgrammingError: Incorrect number of bindings supplied. The current statement uses 9, and there are 10 supplied." My objective here is to update my Google Transit Feed / GTFS. In particular I'm trying to find an easier way to update "shapes.txt".

0 Kudos
1 Solution

Accepted Solutions
MelindaMorang
Esri Regular Contributor

In your stop_times.txt file, each row has an extra comma at the end.  You have 9 headers, but effectively 10 columns of data, even though the last column (after the final comma) has nothing in it.

I'm not sure why my tool isn't handling that situation, but I will update it so it doesn't fail.

A quick and simple fix for you is to just add a dummy column name in your stop_times.txt file:

trip_id,arrival_time,departure_time,stop_id,stop_sequence,stop_headsign,pickup_type,drop_off_type,shape_dist_traveled,junk

The tool will succeed and will ignore the junk column.

View solution in original post

0 Kudos
4 Replies
MelindaMorang
Esri Regular Contributor

What version of ArcGIS are you using?  And is your GTFS dataset available somewhere where I can play with it and run some tests?

0 Kudos
JackDrost
New Contributor III

ArcGIS Pro version 2.3.2. And yes, enclosed is a zip file with the GTFS dataset. Thanks for your help with this!

-Jack

0 Kudos
MelindaMorang
Esri Regular Contributor

In your stop_times.txt file, each row has an extra comma at the end.  You have 9 headers, but effectively 10 columns of data, even though the last column (after the final comma) has nothing in it.

I'm not sure why my tool isn't handling that situation, but I will update it so it doesn't fail.

A quick and simple fix for you is to just add a dummy column name in your stop_times.txt file:

trip_id,arrival_time,departure_time,stop_id,stop_sequence,stop_headsign,pickup_type,drop_off_type,shape_dist_traveled,junk

The tool will succeed and will ignore the junk column.

0 Kudos
JackDrost
New Contributor III

This appears to have worked. I somehow accidentally created that last column in Excel, but it was easy to fix. I cannot thank you enough for your quick response on this!

-Jack

0 Kudos