ValueError: invalid literal for int() with base 10: 1
时间: 2023-10-16 13:07:02 浏览: 120
这个错误是由于将非数字的字符串转换为整数时引起的。在这个特定的例子中,错误是因为尝试将字符串"balabala"转换为整数时出现的。要解决这个问题,你需要确保你传递给int()函数的参数是一个有效的数字字符串。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [ValueError: invalid literal for int() with base 10:解决方法](https://blog.csdn.net/weixin_44034883/article/details/112918440)[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_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *2* [ValueError: invalid literal for int() with base 10](https://blog.csdn.net/m0_38132177/article/details/122523923)[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_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
- *3* [Python ValueError: invalid literal for int() with base 10 实用解决方法](https://download.csdn.net/download/weixin_38739164/13764638)[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_1"}}] [.reference_item style="max-width: 33.333333333333336%"]
[ .reference_list ]
阅读全文