Error: invalid regex test
Closed this issue · 4 comments
The error appears while running npm start
in the whosonfirst
on Ubuntu 18.04:
2019-06-30T21:53:33.579Z - error: [whosonfirst] doc generator error: invalid regex test, http://en.wikipedia.org/wiki/Narsdorf should not match /https?:\/\//
2019-06-30T21:53:33.579Z - error: [whosonfirst] { "id": 1125331493,
"name": "Narsdorf", "name_aliases": [],
"name_langs": { "li": [
"http://en.wikipedia.org/wiki/Narsdorf" ]
},
"place_type": "localadmin",
"lat": 51.0167,
"lon": 12.7167, "bounding_box": "12.7167,51.0167,12.7167,51.0167", "population": 1707,
"hierarchies": [ { "continent_id": 102191581,
"country_id": 85633111, "county_id": 102064227, "localadmin_id": 1125331493,
"region_id": 85682523
} ] }
@vrozental you can ignore these 'errors', they are indicating that the document had an URL when we were expecting a name.
The actual error here is that these warnings are too verbose in the logging which makes people assume there was an import error when there wasn't.
duplicate of pelias/docker#89 and pelias/polylines#216.
Thank you @missinglink
I saw this issue come through and confirmed that the record no longer contains this bunk name property.
@missinglink - this test seems very useful.. can you point me to where these tests live?
@stepps00 we actually introduced the regex to catch bad data in OSM but it seems to catch errors in all datasets.
The test itself is in pelias/model
, it's a simple regex test /https?:\/\//
to check a 'name' property doesn't start with http(s)://