how do I use `UnparsedAddressInputs` or `AddressIn...
# development
f
how do I use
UnparsedAddressInputs
or
AddressInput.parse
to parse address strings in a way that does not throw an exception if the string is not parseable as an address? (context is I want to have a fallback way to parse those strings as JVM coordinate strings if they are not parseable as addresses.) I don’t see None returned anywhere so I assume
AddressInput.parse
raises exceptions
h
yeah it raises exception. do you specifically want to handle failure if the address does not exist? vs if the string is not parseable as an address?
f
I want to handle both. If it is a valid address but there is no target there, it should error. But if it is not parsable as an address then I’d like to fallback to treating it as a coordinate string.
I could do the inverse and check if it is a coordinate string (colon-separated and three fields) first.
h
K, then you can use
AddressInput.parse()
with a try/except. Then use
await Get(Address, AddressInput, address_input)
f
ok