This simple program throws the error:
IndexError: tuple index out of range in installed Python but
works fine in Glowscript.
Error thrown in
- Python 3.11.3
from vpython import curve, vec
curve(pos=(vec(0,0,0),vec(1,1,0)))
The traceback follows:
curve(pos=(vec(0,0,0),vec(1,1,0)))
File C:\Program Files\Python311\Lib\site-packages\vpython\vpython.py:2037 in __init__
self.append(tpos)
File C:\Program Files\Python311\Lib\site-packages\vpython\vpython.py:1893 in append
pts, cps = self.process_args(*args1, **args)
File C:\Program Files\Python311\Lib\site-packages\vpython\vpython.py:1833 in process_args
tpos = self.parse_pos(args1[0])
File C:\Program Files\Python311\Lib\site-packages\vpython\vpython.py:1878 in parse_pos
v = list_to_vec(v)
File C:\Program Files\Python311\Lib\site-packages\vpython\vpython.py:185 in list_to_vec
return vector(L[0], L[1], L[2])
IndexError: tuple index out of range