Python Forum
I try to import Vpython and I get a "ZeroDivisionError"
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I try to import Vpython and I get a "ZeroDivisionError"
#7
@snippsat is correct. You do not get the error when importing the library. It only has an effect when the program exits, which happens immediately if your program consists solely of "import vpython". Try this:
import vpython
import time

time.sleep(10)
No error until 10 seconds has passed.

My guess is the divide by zero function is a default exit function that you are meant to override.
Reply


Messages In This Thread
RE: I try to import Vpython and I get a "ZeroDivisionError" - by deanhystad - Jul-24-2023, 02:10 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  ZeroDivisionError laurawoods 1 339 Apr-11-2024, 03:27 AM
Last Post: deanhystad
  Overcoming ZeroDivisionError: division by zero Error dgrunwal 8 5,241 Jun-12-2020, 01:52 PM
Last Post: dgrunwal
  ZeroDivisionError CIVILmath 2 2,595 Jan-17-2019, 02:38 AM
Last Post: CIVILmath
  Vpython Delay in plotting points SohaibAJ 0 2,123 Jul-30-2018, 08:44 PM
Last Post: SohaibAJ
  Anaconda / Spyder / VPython mwatson87 3 107,540 May-24-2018, 01:51 PM
Last Post: snippsat
  VPython - Trying to make orbit simulation totalnoob 2 5,718 Sep-13-2017, 03:59 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020