【发布时间】:2022-01-06 10:51:25
【问题描述】:
当我使用import json 得到错误ImportError: cannot import name 'JSONDecodeError' from 'json' (unknown location)
经过一些研究,我改变了
try:
import simplejson as json
except ValueError:
import json
现在新的错误是AttributeError: module 'json' has no attribute 'dumps'
谁能帮我理解这里发生了什么?我正在使用 Python 3.9V
【问题讨论】:
标签: json python-3.x import attributeerror simplejson