catch ValueError when ipv6 isn't not supported on the platform

fix #479