Pelias import all throws errors when installing pelias in docker locally

Hi,
I’m trying to install pelias locally with data for London. I’m following the instructions for a local docker install here:
https:// github com pelias docker
I can follow the instructions to get the portland-metro running just fine.

However, when I run the command “pelias import all” I get the following error. Can anyone help me with whats going wrong please?:

/code/pelias/whosonfirst/node_modules/pelias-blacklist-stream/parser.js:11
    throw new Error( 'file not found' );
    ^
Error: file not found
    at load (/code/pelias/whosonfirst/node_modules/pelias-blacklist-stream/parser.js:11:11)
    at /code/pelias/whosonfirst/node_modules/pelias-blacklist-stream/loader.js:26:48
    at Array.map (<anonymous>)
    at loader (/code/pelias/whosonfirst/node_modules/pelias-blacklist-stream/loader.js:26:31)
    at blacklistStream (/code/pelias/whosonfirst/node_modules/pelias-blacklist-stream/index.js:22:15)
    at fullImport (/code/pelias/whosonfirst/src/importStream.js:16:11)
    at /code/pelias/whosonfirst/import.js:37:3
    at getDBList (/code/pelias/whosonfirst/src/bundleList.js:56:3)
    at Object.getList [as generateBundleList] (/code/pelias/whosonfirst/src/bundleList.js:61:12)
    at Object.<anonymous> (/code/pelias/whosonfirst/import.js:16:9)

I’m trying to create my own custom project for London as there isn’t one provided. To this end, I’ve created my own pelias.json file (to follow in a follow up post)

Any and all help would be greatly appreciated, thanks.

Here’s my pelias.json file for london data

{
  "logger": {
    "level": "debug",
    "timestamp": false
  },
  "esclient": {
    "apiVersion": "7.5",
    "hosts": [{ "host": "elasticsearch" }]
  },
  "elasticsearch": {
    "settings": {
      "index": {
        "refresh_interval": "10s",
        "number_of_replicas": "0",
        "number_of_shards": "1"
      }
    }
  },
  "api": {
    "services": {
      "pip": { "url": "http: // pip: 4200" },
      "libpostal": { "url": "http: // libpostal:4400" },
      "placeholder": { "url": "http: // placeholder:4100" },
      "interpolation": { "url": "http: // interpolation:4300" }
    },
    "defaultParameters": {
      "focus.point.lat": 54.0,
      "focus.point.lon": -2.54
    }
  },
  "imports": {
    "adminLookup": {
      "enabled": true
    },
	"blacklist": {
      "files": [
        "/data/blacklist/osm.txt"
      ]
    },
	"csv": {
      "datapath": "/data/csv",
      "files": [],
      "download": [
        "https: // raw.githubusercontent.com/pelias/csv-importer/master/data/example.csv"
      ]
    },
    "geonames": {
      "datapath": "/data/geonames",
      "countryCode": "GB"
    },
    "openstreetmap": {
      "download": [
        {
          "sourceURL": "https: // download.geofabrik.de/europe/united-kingdom/england/greater-london-latest.osm.pbf"
        }
      ],
      "leveldbpath": "/tmp",
      "datapath": "/data/openstreetmap",
      "import": [
        {
          "filename": "greater-london-latest.osm.pbf"
        }
      ]
    },
    "openaddresses": {
      "datapath": "/data/openaddresses",
      "files": []
    },
    "polyline": {
      "datapath": "/data/polylines",
      "files": ["extract.0sv"]
    },
    "whosonfirst": {
      "datapath": "/data/whosonfirst",
      "importPostalcodes": true,
      "countryCode": "GB",
      "importPlace": ["85633159"]
    }
  }
}

Note that in the quoted pelias.json file, URLs have been doctored such that the post can be accepted

Hi @AlanMott,

best take that to the issue section of

We can only help with our hosted version.

Best regards

1 Like

Thanks. I hadn’t noticed it had an issues section! Thanks for the heads up. I may however, have fixed it (not 100% sure yet as the build is still running), but my pelias.json file had a rogue section in it pointing to blacklist file i didnt have

“blacklist”: {
“files”: [
“/data/blacklist/osm.txt”
]
}

I changed this to

“blacklist”: {
“files”: [
]
}

and the error seems to have gone away! I’m providing this update in case it helps anyone else.

1 Like