better to put this line after the try/except. Everything that is in the try: should be minimal. (you could even define request_data before the statement)