To Fix ValueError: Expecting property name enclosed in double quotes Error just Enclose strings with double quotes. Just enclose strings with double quotes like below one: str = str.replace("\\'", "\"")