pelias / csv-importer

Import arbitrary data in CSV format to Pelias
MIT License
23 stars 21 forks source link

Getting Error while importing csv file in pelias #109

Open bmyashaswi opened 1 month ago

bmyashaswi commented 1 month ago

Hi there, I have problem when import custom csv file I getting error :

Here is the step i followed: step : 1 git clone https://github.com/pelias/csv-importer cd csv-importer

step: 2 npm install step:3 create a pelias.json file added the below code

{ "logger": { "level": "debug", "timestamp": false }, "esclient": { "apiVersion": "7.5", "hosts": [ { "protocol": "http", "host": "localhost", "port": 9200 } ] }, "api": { "targets": { "csv": ["name"] } }, "elasticsearch": { "settings": { "index": { "refresh_interval": "10s", "number_of_replicas": "0", "number_of_shards": "1" } } }, "imports": { "whosonfirst": { "datapath": "csv-importer/wof/data/whosonfirst-data-admin-in-latest.db", "importPostalcodes": true }, "csv": { "datapath": "./data", "files": ["/example.csv"] } } }

my csv containes like this;

id,name,latitude,longitude,address,city,state,postcode 1,Example Place,37.7749,-122.4194,123 Example St,San Francisco,CA,94103 2,Another Place,34.0522,-118.2437,456 Another Ave,Los Angeles,CA,90001

step :4 I given permission for .csv file step :5 ./bin/start

After this i am getting error like this:

tech@tech-HP-280-Pro-G6-Microtower-PC:/media/tech/New Volume/pelias/csv-importer$ ./bin/start info: [csv-importer] Importing 1 files. info: [csv-importer] Creating read stream for: data/example.csv debug: [wof-admin-lookup] [postalCityMap] loaded /media/tech/New Volume/pelias/csv-importer/node_modules/pelias-wof-admin-lookup/src/data/ASM.tsv debug: [wof-admin-lookup] [postalCityMap] loaded /media/tech/New Volume/pelias/csv-importer/node_modules/pelias-wof-admin-lookup/src/data/GUM.tsv debug: [wof-admin-lookup] [postalCityMap] loaded /media/tech/New Volume/pelias/csv-importer/node_modules/pelias-wof-admin-lookup/src/data/MNP.tsv debug: [wof-admin-lookup] [postalCityMap] loaded /media/tech/New Volume/pelias/csv-importer/node_modules/pelias-wof-admin-lookup/src/data/PRI.tsv debug: [wof-admin-lookup] [postalCityMap] loaded /media/tech/New Volume/pelias/csv-importer/node_modules/pelias-wof-admin-lookup/src/data/USA.tsv debug: [wof-admin-lookup] [postalCityMap] loaded /media/tech/New Volume/pelias/csv-importer/node_modules/pelias-wof-admin-lookup/src/data/USA.override.tsv debug: [wof-admin-lookup] [postalCityMap] loaded /media/tech/New Volume/pelias/csv-importer/node_modules/pelias-wof-admin-lookup/src/data/VIR.tsv debug: [wof-admin-lookup] [postalCityMap] loaded /media/tech/New Volume/pelias/csv-importer/node_modules/pelias-wof-admin-lookup/src/data/NLD.tsv debug: [wof-admin-lookup] [useEndonyms] loaded /media/tech/New Volume/pelias/csv-importer/node_modules/pelias-wof-admin-lookup/src/data/aliases/country-endonyms.psv debug: [wof-admin-lookup] [useEndonyms] loaded /media/tech/New Volume/pelias/csv-importer/node_modules/pelias-wof-admin-lookup/src/data/aliases/region-endonyms.psv debug: [wof-admin-lookup] [useEndonyms] loaded /media/tech/New Volume/pelias/csv-importer/node_modules/pelias-wof-admin-lookup/src/data/aliases/locality-megacity-endonyms.psv info: [csv-importer] Total time taken: 3.954s

/media/tech/New Volume/pelias/csv-importer/node_modules/pelias-wof-admin-lookup/src/localPipResolver.js:19 throw err; ^ unable to locate sqlite folder (Use node --trace-uncaught ... to show where the exception was thrown)

Node.js v20.15.1 tech@tech-HP-280-Pro-G6-Microtower-PC:/media/tech/New Volume/pelias/csv-importer$