pelias / whosonfirst

Importer for Who's on First gazetteer
MIT License
26 stars 42 forks source link

SqliteError: no such column: geojson.is_alt #506

Open orangejulius opened 4 years ago

orangejulius commented 4 years ago

Since our recent changes to use Who's on First data hosted by Geocode Earth made in #487, people using older WOF dist files from dist.whosonfirst.org will see the following error:

/code/pelias/csv-importer/node_modules/pelias-whosonfirst/src/components/sqliteStream.js:10
    this._iterator = this._db.prepare(sql).iterate();
                              ^
SqliteError: no such column: geojson.is_alt
    at new SQLiteStream (/code/pelias/csv-importer/node_modules/pelias-whosonfirst/src/components/sqliteStream.js:10:31)
    at /code/pelias/csv-importer/node_modules/pelias-wof-admin-lookup/src/pip/readStream.js:26:12
    at CombinedStream._realGetNext (/code/pelias/csv-importer/node_modules/combined-stream/lib/combined_stream.js:104:3)

To anyone seeing this error, the fix is to remove all your Who's on First data and run the downloader again. That will download new data from Geocode Earth.

However, since already several people have reported seeing this, I wonder if it makes sense to add some code to detect this condition and message appropriately.

petertoner commented 4 years ago

I am setting up a new North America installation this week. All data downloaded from scratch following along with the Docker instructions and still got the same error as this. What steps are necessary after downloading WOF data again? Other considerations? Any help would be appreciated!

stefanocudini commented 3 years ago

I have same problem!

orangejulius commented 3 years ago

@stefanocudini can you post the output of ls -lh as well as md5sum *.db for all your wof SQLite db files? They should be in $DATA_DIR/whosonfirst

This really shouldn't be a problem these days, so unless you are using very old data (before april of this year), something else might be going on that we aren't aware of.