This occurs if there is a planet prototype defined that does not have any map_gen_settings defined. That property is considered optional according to the documentation, so this is not a problem with the "offending" planet prototype.
Failed to load mods: naufulglebunusilo/prototype/helpers.lua:27: attempt to index field 'map_gen_settings' (a nil value)
stack traceback:
naufulglebunusilo/prototype/helpers.lua:27: in function 'concat_planets'
naufulglebunusilo/data.lua:41: in main chunk
After fixing that one (see below), the same thing occurs later in the script.
Failed to load mods: naufulglebunusilo/prototype/helpers.lua:132: attempt to index field 'map_gen_settings' (a nil value)
stack traceback:
naufulglebunusilo/prototype/helpers.lua:132: in function 'autoplace_controls_generator'
naufulglebunusilo/data.lua:53: in main chunk
You'll want to add some quick sanity checks for the existence of map_gen_settings before using its properties. You probably don't want to concat planets that don't have it, anyway.
if v.map_gen_settings then
concatted = helper.concat_tables(concatted, v.map_gen_settings.autoplace_settings[index].settings)
end
Wrapping both of those instances solved it in my local copy.