AttributeError: 'int' object has no attribute 'endswith'
时间: 2023-10-07 11:09:29 浏览: 174
AttributeError: 'int' object has no attribute 'endswith'表示整数类型对象(int)没有endswith属性。这个错误通常发生在尝试对整数对象应用endswith()方法时。endswith()方法是字符串的方法,而不是整数的方法。所以,尝试在整数对象上使用endswith()方法会导致AttributeError错误的发生。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* *2* [AttributeError:‘list’对象没有属性’endswith’ (AttributeError: ‘list’ object has no attribute ...](https://blog.csdn.net/weixin_45751925/article/details/131640572)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *3* [name的时候报错:AttributeError: ‘int‘ object has no attribute ‘endswith](https://blog.csdn.net/weixin_41010198/article/details/115669642)[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^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文