First up... you need to paste the line (and the code) around the error. There is no list manipulation in the code you've given, so without the area around the error, it's going to be pretty difficult to assist.