Added encode('utf8') on strings before passing them to urlencode