handle IncompleteRead exception in urlopen()