I have a python script, in which there is a dictionary. For some reason, I need to convert dictionary to json. But, whenever script executed, It gives below error
UnicodeDecodeError: 'utf8' codec can't decode byte 0xe9 in position 604: invalid continuation byte
for line json.dumps(data_dict).
From link, I understand that non utf character should be decoded. But how to do it in a script? How we can get character at that positon from dictionary and decode it.
On interpreter, it works. Below is interpreter snippet.