◐ Shell
clean mode source ↗

Message 366243 - Python tracker

> the problem (or at least with these numbers) occurs only when 
> the code is saved in a script, and this is run by double-
> clicking the file

The .py file association is probably using a different version of Python, or it's associated with the py launcher and there's a shebang in the file that runs 2.7. Verify the version that's executing the script. If it's running in 3.7, follow up in a new issue or on python-list. Please do not follow up on this resolved issue. Also, please try to reproduce the issue on a supported, updated system. Windows Vista is not supported by 3.7, and the latest 3.7 release is 3.7.7.