AttributeError: 'int' object has no attribute 'items'
时间: 2023-08-26 18:06:27 浏览: 222
python报错: list object has no attribute shape的解决
AttributeError: 'int' object has no attribute 'items'是Python中的一个属性错误。这个错误通常发生在你尝试将一个整数(int)对象作为一个字典(dict)来使用,但整数对象没有items()方法来返回键值对。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [AttributeError: ‘int‘ object has no attribute ‘items‘_Python中使用items()方法遍历字典的例子](https://blog.csdn.net/weixin_45928096/article/details/122358272)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [AttributeError: ‘int‘ object has no attribute ‘items](https://blog.csdn.net/May_JL/article/details/122746730)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [python报错: list object has no attribute shape的解决](https://download.csdn.net/download/weixin_38748721/13708867)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v92^chatsearchT0_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文