I am trying to run a simple code in vpython to check if everything works ok with the module. My code looks like:
from vpython import *
scene=canvas()
scene.width=550
scene.height=550
scene.height=580
scene.range=2
ball=sphere(pos=vec(0,0,0),radius=0.8,color=color.orange)
I run it using command: python3 foo.py
. However after that, the program is freezing and when I kill the process I receive the following traceback:
Exception ignored in: <bound method standardAttributes.__del__ of <vpython.vpython.sphere object at 0x7f25192959e8>>
Traceback (most recent call last):
File "/home/kuba_unix/.local/lib/python3.5/site-packages/vpython/vpython.py", line 1105, in __del__
super(standardAttributes, self).__del__()
File "/home/kuba_unix/.local/lib/python3.5/site-packages/vpython/vpython.py", line 315, in __del__
cmd = {"cmd": "delete", "idx": self.idx}
AttributeError: 'sphere' object has no attribute 'idx'
But I do not know if that is the problem. I am working on Windows 10 and use Windows Subsystem for Linux. For plotting, I use Xming window and set in the bash console the display using export DISPLAY=:0
.
Until today I did not encounter any problems with plotting (gnuplot and matplotlib work perfectly fine). For additional information, I am using Python 3.5.2 and the version of vpython is ['7.5.0', 'jupyter'] (importing the module does not raise any errors). The result of this program should look like in this example.