Re: Error occur when running

878 views
Skip to first unread message

Bruce Sherwood

unread,
Jun 7, 2017, 7:40:06 AM6/7/17
to VPython-users
I don't know what causes this error (maybe a Jupyter expert can comment), but I've always found that the cure is simply to replot the page (or maybe just restart the kernel). Have you tried this?

Aaron Titus

unread,
Jun 7, 2017, 8:23:19 AM6/7/17
to vpytho...@googlegroups.com
This error does not seem to affect running the vpython program or running the rest of the notebook. I see this error regularly, especially when creating a presentation that has many vpython programs in the same notebook. I do not know what causes the error. I also am not sure whether it is related to vpython or not.

A Google search on the error goes back to this ipython post from 2011.


In summary, the “error” is may be annoying but not fatal.

AT

On Jun 7, 2017, at 1:55 AM, Lonan S. <sf.l...@gmail.com> wrote:

Hello, I am learning how to code and use vpython and then I got this error from running this code with Jupyter notebook. Is there any way to solve this problem?
ERROR! Session/line number was not unique in database. History logging moved to new session 88
. . .
from vpython import *
from math import *
canvas
(width=900,height=900)
proj
= sphere(pos = vector(-5,0,0),
             radius
= 0.1,
             color
= color.red,
             make_trail
=True)
#velocity vector components
proj
.speed = 10.0 #initial speed
proj
.angle = 45*3.141459/180 #initial angle from the x+ axis
#velocity vector
proj
.velocity = vector(proj.speed*cos(proj.angle),
                       proj
.speed*sin(proj.angle),
                       
0)
proj
.mass = 1.0
grav_field
= 9.8

#time
dt
= 0.01
time
=0

#loop
while(proj.pos.y >= 0):
    rate
(10)
   
#force(s)
    grav_force
= vector(0,-proj.mass*grav_field,0)
   
   
#Total force
    force
= grav_force
   
   
#Update Velocity
    proj
.velocity += force/proj.mass * dt
   
   
#Update Position
    proj
.pos += proj.velocity * dt
   
   
#Update Time
    time
+= dt
Thanks for your answer.


--
You received this message because you are subscribed to the Google Groups "VPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vpython-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages