python脚本中的导入json在Intellij中不起作用

发布于 2025-02-03 22:22:03 字数 766 浏览 2 评论 0原文

我将JSON库用于加载JSON文件。在Visual Studio代码中,它的工作原理非常完美,但是在Intellij Idea中,我有问题。

当我尝试使用时,我会收到错误:attributeError:模块'json'没有属性'loads'。

​在Databricks中工作正常。

I use json library for load json files. In Visual Studio Code it works perfect, but in Intellij IDEA, I have problem.

enter image description here

When I try to use, I get error: AttributeError: module 'json' has no attribute 'loads'.
enter image description here

enter image description here

This is just in intellij problem. In databricks work fine.

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

掀纱窥君容 2025-02-10 22:22:03

在第一个屏幕截图中,您使用:“ json.load”
在最后的屏幕截图中,您使用:“ json.loads”

In the first screenshot you use: "json.load"
In the last screenshot you use: "json.loads"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文