Closed horstjens closed 2 years ago
Thanks much for the report. This works correctly in Web VPython but is a bug in the vpython module used with installed Python.
I found the bug, which will be fixed the next time there is a release of the vpython module. In the meantime, starting at line 2936 in site-packages/vpython/vpython.py, replace the def follow function with this:
def follow(self, obj): ## should allow a function also
if obj is None:
self.addmethod('follow', 'None')
else:
self.addmethod('follow', obj.idx)
using Ubuntu Linux 21.10, python 3.9.7, vpython version 7.3.6 jupyter: after upgrading to vpython version 7.6.3, i got this error when my program tries to execute the scene.follow(None)"command:
The error is reproducable using idle or a python shell:
Is this a re-introduced error from version <7.6.1 ? If i run a bigger vpython program, i got those error messages below. The program still continues to work, but the camera is still following the object from the last camera.follow command, it is ignoring the "scene.camera.follow(None)" command.
my current workaround is to let the camera follow an non-moving object