Faced with the same problem and solved it by using tuples instead of lists:
# How it looked before:
point1, point2 = [x1, y1], [x2, y2]
# How it should be:
point1, point2 = (x1, y1), (x2, y2)
Faced with the same problem and solved it by using tuples instead of lists:
# How it looked before:
point1, point2 = [x1, y1], [x2, y2]
# How it should be:
point1, point2 = (x1, y1), (x2, y2)