What does this overflow error in python mean?

I ran into this issue today while running Python 3.7.2 on Windows Subsystem for Linux (WSL) in Ubuntu, so Thiago's answer isn't universal. After doing some research, it turns out that WSL doesn't handle uptimes appropriately with longer periods of time (credit to "Petter S" for finding this symptom).

Restarting Windows fixes the bad uptime and makes Python runnable again.


Update 1: WSL 2 is officially announced with an expected release of June 2019 for Windows Insider builds. Given that Microsoft has built a new Linux kernel for WSL 2, I'd expect this bug to have been addressed - if anyone reproduces on WSL 2, please feel free to update.


Update 2: WSL 2 is live and installable, possibly only for the Insider ring. I haven't personally tested for this issue yet, but hopefully this issue is addressed as of this release.


From https://github.com/microsoft/WSL/issues/3514 followed instructions to restart WSL service (so I don't need to reboot)

All the broken tools, aws/python, ps, docker/tcp worked fine when I launched my Ubuntu WSL session again

In PowerShell (Admin)

PS C:\WINDOWS\system32> Get-Service LxssManager | Restart-Service