I spent probably couple of hours wondering about source of this error when customizing my own minimal import:
ERROR: Error loading lua config: /osm2pgsql-themepark/lua/themepark.lua:136: attempt to index a nil value.
when the input flex Lua code was this:
local themepark = require('themepark')
themepark:add_topic('shortbread_v1/water')
It turns out it was fixed by adding:
themepark:add_topic('core/name-all')
but it was not really obvious either from the error, or from the documentation I had found.
Improvement ideas
-
Perhaps the topics should ensure the themes/topics they refer to are defined on their own?
-
Perhaps the error message could be better? (in this case, core/name column was not defined)