Hello there. Here comes my problem.
I can run the following program in WebPython(GlowScript.com) but when i run in my own computer, something wrong.
=====Here is code=====
Web VPython 3.2
cube= box()
def xShift(s):
cube.pos.x = s.value
xs_capaction.text = "x = " + "{:1.2f}".format(xs.value) + "\n\n"
xs = slider(bind=xShift,min=-5,max=5,value = 0)
xs_capaction = wtext(text = "x = " + "{:1.2f}".format(xs.value) + "\n\n")
===== Code end=====
When I run the program in my own mac installed vpython, it show some error.
=====Here is code=====
from vpython import *
cube= box()
def xShift(s):
cube.pos.x = s.value
xs_capaction.text = "x = " + "{:1.2f}".format(xs.value) + "\n\n"
xs = slider(bind=xShift,min=-5,max=5,value = 0)
xs_capaction = wtext(text = "x = " + "{:1.2f}".format(xs.value) + "\n\n")
===== Code end=====
Error message shows as follows:
===== Error Msg =====
Task exception was never retrieved
future: <Task finished name='Task-140' coro=<WSserver.onMessage() done, defined at /Users/abd/Documents/vpython/vpenv/lib/python3.9/site-packages/vpython/no_notebook.py:181> exception=RuntimeError("can't register atexit after shutdown")>
===== Msg =====
Does someone know how to fix it and run successfully in my own computer?