python中报错AttributeError: module ‘json‘ has no attribute ‘loads‘
python中报错AttributeError: module ‘json‘ has no attribute ‘loads‘

看到这个报错第一反应是啥,what the fu*k,刚才看好好的,就是新建了新的文件就不给我用了?
原因,python的名字不能是json,需要修改为其他的
当Python程序出现AttributeError: module 'json' has no attribute 'loads'错误时,通常是因为创建了与内置模块json同名的文件。解决这个问题的方法是更改自定义文件名,以防止名字冲突。确保正确导入和使用标准库中的json模块,以进行有效的数据序列化和反序列化操作。
python中报错AttributeError: module ‘json‘ has no attribute ‘loads‘
python中报错AttributeError: module ‘json‘ has no attribute ‘loads‘

看到这个报错第一反应是啥,what the fu*k,刚才看好好的,就是新建了新的文件就不给我用了?
原因,python的名字不能是json,需要修改为其他的
9580
1814

被折叠的 条评论
为什么被折叠?