You have two places in your code where you have a quote character next to an open parenthesis. You need to put a comma between them as a separate, because if you don't, the parenthesis are treated as the function-call operator and the Python strings are interpreted as if they were functions.
Also, in the future, always include your full traceback verbatim, you'll likely save us a great deal of time helping you. In a case like this, hard-coding input variables so long as the problem is reproducible is always advantageous, since in this case it was reproducible either branch, and the code short and simple enough to understand, that is not always the case.
Join the #python-forum IRC channel on irc.freenode.net!
Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.