If geometry flags are specified rather that can't be cast to integers, intercept the ValueError raised by Python and raise a more sensible exception. Fixes #446