Converting the popup message to python string