fix for post data type error in py3.