NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

I am currently running a postgres DB in a docker container. I want to upload a small pbf file usinf osm2pgsql using the new flex-backend. However i'm runing into problems with Lua.

My osm command:

osm2pgsql -d osm -U osm2pgsql -H XXX.XX.XX.XXX -P 5432 -c pbf_files/district-of-columbia-latest.osm.pbf -W -O flex -S flex-config/unitable.lua --flat-nodes flat-nodes --keep-coastlines --cache 30000 --hstore --hstore-add-index --tablespace-index pg_default --number-processes 8 --cache-strategy dense --extra-attributes --slim

The error message: 2021-07-30 17:30:52 node cache: stored: 3(100.00%), storage efficiency: 0.02% (dense blocks: 2, sparse nodes: 0), hit rate: 0.00% 2021-07-30 17:30:52 ERROR: Failed to execute Lua function 'osm2pgsql.process_node': flex-config/unitable.lua:42: Error in 'add_row': Invalid type 'table' for text column.

stack traceback: [C]: in method 'add_row' flex-config/unitable.lua:42: in function 'process' flex-config/unitable.lua:53: in function <flex-config unitable.lua:52="">.

I can run the upload with the default backend and I've tried all default templates provided by osm2pgsql but know of them work, they all return the same error.

Would greatly appreciate some help. Chris

asked 30 Jul '21, 18:49

chrisvreug's gravatar image

chrisvreug
11112
accept rate: 0%


You are using an older version of osm2pgsql (before 1.5.0) with a config file (unitable.lua) that is made for osm2pgsql 1.5.0 or greater. Update your osm2pgsql to 1.5.1 or use an older version of the unitable.lua file.

Also: Check your command line. Many of the options you are using don't do anything when the flex output is used, so you should probably get rid of them.

permanent link

answered 31 Jul '21, 07:40

Jochen%20Topf's gravatar image

Jochen Topf
5.2k55074
accept rate: 31%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×263
×5

question asked: 30 Jul '21, 18:49

question was seen: 1,600 times

last updated: 31 Jul '21, 07:40

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum