pip install simplejson
因为win10在运行某些程序(含request并且有发送包)的时候突然报了标题中的错误,在网络上找了解决方案,安装第三方包simplejson立刻解决了这个问题。
python版本3.x
import re
import os
import requests
from requests import RequestException
>>> import json
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\jso
n\__init__.py", line 106, in <module>
from .decoder import JSONDecoder, JSONDecodeError
ImportError: cannot import name 'JSONDecoder' from 'json.decoder'
本文供自己记录问题使用,遇到相同问题但是本文没有解决的就在评论区告诉我吧。