This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

Error loading pbf file

0

I'm loading data into a Postgresql 9.5 over Ubuntu 16.04 but I having some issue with some pbf files, like "argentina-latest.osm.pbf" or "south-america-latest.osm.pbf", but no problem with "uruguay-latest.osm.pbf" or "venezuela-latest.osm.pbf"

Server: 12GB RAM 16 cores

I have tried with different values for -C osm2pgsql parameter but the result is always the same.

Into line 4390 of /home/platform/src/SomeoneElse-style/style.lua file we can see: keyvalues["name"] = keyvalues["name"] .. " (" .. keyvalues["iata"] .. ")"

May be invalid content of some pbf files ?

How I can avoid the "contatenate nil value" in such setence ?

osm2pgsql -d gis --create --slim -C 3500 --number-processes 12 -S ~/src/openstreetmap-carto-AJT/openstreetmap-carto.style --multi-geometry --tag-transform-script ~/src/SomeoneElse-style/style.lua ~/data/south-america-latest.osm.pbf

but some minutes after:

Using PBF parser. Processing: Node(10320k 94.7k/s) Way(0k 0.00k/s) Relation(0 0.00/s)node cache: stored: 10434925(100.00%), storage efficiency: 50.81% (dense blocks: 148, sparse nodes: 9661361), hit rate: -nan%

Osm2pgsql failed due to ERROR: Failed to execute lua function for basic tag processing: /home/platform/src/SomeoneElse-style/style.lua:4390: attempt to concatenate field 'name' (a nil value)

Could you give me any clue? Thanks, Alberto Butrico

asked 13 Dec '18, 21:29

abutrico's gravatar image

abutrico
11112
accept rate: 0%

Unlikely to be a problem with the data, more likely to be a bug in the map style. Maybe it is assuming that all airports with iata codes have names and there is one in your data that does not?

(13 Dec '18, 21:47) SomeoneElse ♦

One Answer:

1

Try it again. I've fixed it here.

answered 14 Dec '18, 08:47

SomeoneElse's gravatar image

SomeoneElse ♦
36.9k71370866
accept rate: 16%

Source code available on GitHub .