python - Json UnicodeEncodeError for requests response
问题描述
I get this error:
UnicodeEncodeError: 'charmap' codec can't encode character '\u2082' in position 1088: character maps to <undefined>
when I try to load a request text to JSON in python 3.9, so my code is:
rq= requests.get(url)
rqJson= json.loads(rq.text)
print(rqJson)
I'm using Windows 10 and sys.stdout.encoding
is utf-8
any help with this please?
解决方案
推荐阅读
- python - Creating pyplot graphs in a for loop that close before the next is shown (with an interactive function in between)
- python - What's the right way to pass browser profile to selenium inside docker container?
- javascript - How to create a React Link to make API call through click handler
- python - Python child class inherit and override from arbitrary parent
- signal-processing - 功率谱密度的归一化常数
- javascript - By transform scaleX (-1) item goes out of the screen?
- angular - Cannot determine the module for class TimeAgoPipe
- python - Python3 - Plotting the same matplotlib axes object on multiple figures?
- android - Getting this android.view.ViewRootImpl cannot be cast to android.view.View
- html - Is there any way to select for the native placeholder of an input[type=date] in browsers other than Chrome?