In Python, indentation matters, and changes between lines have meaning. The last line of the code you posted is indented compared to the one before when it should not be. This is so wrong that it is a syntax error rather than an error which would happen at run time. If the fix is not obvious, post back, and provide as much description as you can as to what you think your code does and why it should be working.
Join the #python-forum IRC channel on irc.freenode.net for off-topic chat!
Please prefer not to PM members. The point of the forum is so that anyone can benefit. We don't want to help you over PMs/emails/Skype chats that others can't benefit from