planarnetwork/dtd2mysql

dtd2mysql --timetable Error: Column count doesn't match value count at row 1

Closed this issue · 3 comments

Hi there,

I've been looking for a CIF/DTD to GTFS converter and came across this code. I've managed to setup my SQL databases and extracted the fare data successfully; however, when trying to run the following:

DATABASE_USERNAME=root DATABASE_NAME=timetable dtd2mysql --timetable ttis926.ZIP

Using the latest timetable data from http://data.atoc.org/ I get the following error:

Extracting ttis926.ZIP to /tmp/dtd/timetable/ Finished ttisf926.alf { Error: Column count doesn't match value count at row 1 at PromisePool.query (/usr/local/lib/node_modules/dtd2mysql/node_modules/mysql2/promise.js:344:20) at MySQLTable.query (/usr/local/lib/node_modules/dtd2mysql/dist/src/database/MySQLTable.js:68:32) at MySQLTable.queryWithRetry (/usr/local/lib/node_modules/dtd2mysql/dist/src/database/MySQLTable.js:53:24) at MySQLTable.flush (/usr/local/lib/node_modules/dtd2mysql/dist/src/database/MySQLTable.js:35:30) at MySQLTable.close (/usr/local/lib/node_modules/dtd2mysql/dist/src/database/MySQLTable.js:45:14) at Promise.all.Object.values.map.t (/usr/local/lib/node_modules/dtd2mysql/dist/src/cli/ImportFeedCommand.js:114:59) at Array.map (<anonymous>) at Interface.readStream.on (/usr/local/lib/node_modules/dtd2mysql/dist/src/cli/ImportFeedCommand.js:114:48) at emitNone (events.js:111:20) at Interface.emit (events.js:208:7) message: 'Column count doesn\'t match value count at row 1', code: 'ER_WRONG_VALUE_COUNT_ON_ROW', errno: 1136, sqlState: '21S01', sqlMessage: 'Column count doesn\'t match value count at row 1' }

The --gtfs-zip process subsequently fails.

Any help would be appreciated.

Thanks

Michael

Hi Michael, I will give that file a run through locally and see what happens. Can you let me know your OS, version of node and version of MySQL?

Cheers

Looks like I introduced a typo a while back, I've corrected it in 7f34fc2 and released 5.2.2

Thanks, --timetable is working now. Michael