Skip to content

Conversation

@maximpavliv
Copy link
Contributor

@maximpavliv maximpavliv commented Nov 11, 2024

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.

@maximpavliv maximpavliv changed the title Timeout retrieving metadata from PyPi Timeout retrieving latest package version from the Web Nov 11, 2024
@maximpavliv maximpavliv force-pushed the maxim/timeout_check_for_updates branch from 1615eca to bebcb0d Compare November 13, 2024 18:21
@maximpavliv maximpavliv force-pushed the maxim/timeout_check_for_updates branch from d15256e to 4dfe156 Compare November 14, 2024 09:31
Copy link
Contributor

@n-poulsen n-poulsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great fix thanks Maxim (really nice to not have the update message when on an RC version)

@n-poulsen n-poulsen merged commit 3d62bce into pytorch_dlc Nov 14, 2024
@n-poulsen n-poulsen deleted the maxim/timeout_check_for_updates branch November 14, 2024 14:09
xiu-cs pushed a commit to xiu-cs/DeepLabCut that referenced this pull request Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants