I have a python program at https://pastebin.com/x7K2tBTG
My problem is when i run it, i get the following errors:
Traceback (most recent call last):
File "some/file.py", line 88, in <module>
clean_up_bubs()
File "some/file.py", line 76, in clean_up_bubs
x, y = get_coords(bub_id[i])
File "some/file.py", line 65, in get_coords
x = (pos[0] + pos[2]) / 2
IndexError: list index out of range
I've done some investigating and it turns out that at some point when the get_coords function is executed, the c.coords(id_num) gives an empty list. Why does it happen and how can i fix this?