Possible mapbox cli bug?
Closed this issue · 5 comments
JayBrown commented
JayBrown commented
perrygeo commented
Have you confirmed that CURRENT_LAT and CURRENT_LONG are valid numbers? It looks like your script needs to guard against invalid locations, i.e. accounting for unset variables (set -u
) and https://github.com/JayBrown/VBBar/blob/master/VBBar.30m.sh#L373-L374
perrygeo commented
I can reproduce the error using the following (invalid) command:
$ mapbox geocoding --reverse "[ , ]" -t address
A ValueError is the expected behavior since the --reverse
argument needs to be an array with two numeric (float) coordinates. Your script should guard against this condition and avoid making a call to the mapbox API unless you have a valid lat and lon.
JayBrown commented
Thank you. I just included another condition for the mapbox query. Hope it'll work.