handle urlopen exception