Q:报错 UnicodeEncodeError: 'latin-1' codec can't encode characters in position 122-125: Body ('陕西西安') is not valid Latin-1. Use body.encode('utf-8') if you want to send it encoded in UTF-8.
A:查看报错信息,找到报错的地方
在request请求前对 入参做一下处理,加一句 params=params.encode("utf-8"),把入参转化为utf-8模式,搞定