'NoneType' object has no attribute 'tokenize'
时间: 2023-08-03 18:03:23 浏览: 513
引用\[2\]中提到的错误是由于变量money被赋值为NoneType类型,而NoneType类型不支持tokenize方法,所以报错了。这种错误通常发生在没有正确读取到数据导致变量为空的情况下。要解决这个问题,你需要确保正确读取到数据并将其赋值给变量money,以便后续使用tokenize方法。
#### 引用[.reference_title]
- *1* *2* [Python异常处理](https://blog.csdn.net/qq_48563775/article/details/126691449)[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^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
- *3* [AttributeError: ‘NoneType‘ object has no attribute ‘xxx‘v](https://blog.csdn.net/m0_69514319/article/details/128799923)[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^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item]
[ .reference_list ]
阅读全文