in reply to I think this is the wrong forums but I am not sure where to ask
You're parsing the reply as if it was a application/x-www-form-urlencoded response, but it's a multipart/form-data response. Use the CGI module.