display line error for "mapping value '%s' not a string"
mayeulk opened this issue · 5 comments
imposm3/mapping/config/config.go
Line 102 in 6528d3e
With an ill-formed yml file, the error message being returned is sometimes as follows:
"mapping value '' not a string"
This is hard to debug. Adding some context (for instance: what is the key?) or, better, the line number, would help a lot.
So far, I think docker-OSM is using a copy from https://github.com/omniscale/imposm3/blob/master/example-mapping.yml
Could you try this one?
Maybe do a git diff
after replacement to check if the version in Docker-OSM is more or less the same.
Thanks Etienne! I managed to create a correct file. THe issue I opened is about the fact that the error message is not informative, and could be improved. For instance, maybe the code could be modified so that the message
"mapping value '%s' not a string"
would be instead:
"mapping value '%s' (tied to mapping key '%t') not a string"
This would help a lot when the mapping value is displayed as an empty string in the message.
Yes sure. It's still an issue upstream indeed. I was just trying to help you to overpass the current problem in your file in the meantime ;-)