Course Library
Learning Paths
Free Courses
Learn Blender 3D in the way that’s right for you.
Inner Circle
Where members share progress and help each other learn.
›
The Commons
A free Blender community open to artists of all skill levels.
Forum Archive › I enjoyed the course but I did spend 1.5 days trying to troubleshoot what I was doing differently (I refactor code as I wr… › Reply To: I enjoyed the course but I did spend 1.5 days trying to troubleshoot what I was doing differently (I refactor code as I wr…
The simplest way to deal with the ‘ZeroDivisionError’ in the script would probably be to change
obj.location = sum / n
to
if n > 0: obj.location = sum / n
Not necessarily the cleanest way, but it works.