VSC & Vpython ZeroDivisionError on exit

41 views
Skip to first unread message

petermfe...@gmail.com

unread,
Sep 18, 2023, 9:54:16 AM9/18/23
to VPython-users
Today I started with Visual Studio Code. I've long used Glowscript / Web Vpython.

I just wanted to report a ZeroDivisionError on exit from vpython.py with Visual Studio Code (see Image).

I suspect it's me, but just in case...
Vpython division by Zero - Screenshot 2023-09-18 144246.jpg

Bruce Sherwood

unread,
Sep 18, 2023, 2:00:52 PM9/18/23
to VPython-users
I think the following paragraph from the VPython installation instructions at vpython.org applies:

When running from a terminal, if the program does not end with a loop
containing a rate() statement, you need to add "while True: rate(30)"
to the end of the program. This is not necessary when launching from
environments such as Jupyter notebook, IDLE, or Spyder.

VPython-users

unread,
Sep 19, 2023, 8:34:17 AM9/19/23
to VPython-users
Sorry I never thought to read the installation instructions, my fault.

I'm using python 3.11.4 and I still get the ZeroDivisionError (see image).
It's not a problem for me, I just thought I'd report.
Thank you for your reply.

Vpython division by Zero (with RATE) - Screenshot 2023-09-19 132146.jpg
Reply all
Reply to author
Forward
0 new messages