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"
#1
I'm new on Python, maybe my question is simple.
I want to simulate some physical situations. I learned that Vpython makes it easy to create simple visualizations, allowing programmers to focus more on the computational aspect of their programs. So I want to learn Vpython.
But I get a "ZeroDivisionError" Exception when I try to import vpython(the module I used is 7.6.4).
Error:
Exception ignored in atexit callback: <function Exit at 0x00000212BA80B420> Traceback (most recent call last): File "D:\pythonProject\OpenCVLearning\venv\Lib\site-packages\vpython\vpython.py", line 22, in Exit a = 1.0/zero ~~~^~~~~ ZeroDivisionError: float division by zero
I find the source code of Vpython and there is a "Exit" function:
def Exit():
    zero = 0.
    print('exit')
    a = 1.0/zero
There is a 1.0/zero, it desn't make any sense. I think it is a very confusing behaviour.
likes this post
Reply


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

Possibly Related Threads…
Thread Author Replies Views Last Post
  ZeroDivisionError laurawoods 1 283 Apr-11-2024, 03:27 AM
Last Post: deanhystad
  Overcoming ZeroDivisionError: division by zero Error dgrunwal 8 5,136 Jun-12-2020, 01:52 PM
Last Post: dgrunwal
  ZeroDivisionError CIVILmath 2 2,547 Jan-17-2019, 02:38 AM
Last Post: CIVILmath
  Vpython Delay in plotting points SohaibAJ 0 2,089 Jul-30-2018, 08:44 PM
Last Post: SohaibAJ
  Anaconda / Spyder / VPython mwatson87 3 97,740 May-24-2018, 01:51 PM
Last Post: snippsat
  VPython - Trying to make orbit simulation totalnoob 2 5,662 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