Timeout retrieving latest package version from the Web by maximpavliv · Pull Request #2782 · DeepLabCut/DeepLabCut
This morning, I had deeplabcut GUI stuck in utils.is_latest_deeplabcut_version() and in misc.is_latest_version(). After some investigation, it seems like
url = "https://pypi.org/pypi/deeplabcut/json"
contents = urllib.request.urlopen(url).read()
was stuck because of some firewall or DNS in Python, but it was working when I was getting the data from the CLI (using curl) or in a web browser.
This case is not handeled by the except URLError block of _check_for_updates(), this PR adds a timeout to trying to read the latest available package versions.