It is usually caused by Chinese characters ,maybe You're parsing json, But the general solution online is to py Specify the character encoding at the beginning of the file :
# -*- coding:utf-8 -*-
In fact, it is directly in the str
Add one more r
that will do
tm = r'''
'''
tstr = json.loads(tm)