I was trying to save my path coordinates as a list. But when i was trying to print the list of points, got errors "unbound variable-plist" . the code is mentioned below.
OK, but you still haven't said which functions you are calling, and in what order. In other words, the sequence of events that led to the error you saw.