file_names,texts = self._load_from_raw_files(root_dir,mode)too many values to unpack (expected 2)
时间: 2024-05-09 21:05:27 浏览: 12
This error occurs when the number of values on the right-hand side of the assignment statement is not equal to the number of variables on the left-hand side.
In this case, it seems like the function `_load_from_raw_files` is returning more than 2 values, but the code is trying to assign only 2 variables (`file_names` and `texts`) to those values.
To fix this error, you can modify the function `_load_from_raw_files` to return only 2 values, or modify the code to accept the additional values returned by the function.
相关问题
file_names,texts = self._load_from_raw_files(root_dir,mode),too many values to unpack (expected 2)
This error occurs when the number of variables on the left-hand side of the assignment operator does not match the number of values on the right-hand side.
In this case, the error is most likely due to the fact that the `_load_from_raw_files()` method is returning more than two values, but the code is only expecting two values to be returned.
To fix this error, you can modify the code to either store all the returned values in a single variable, or update the code to correctly unpack all the returned values.
file_names,texts = self._load_from_raw_files(root_dir,mode)
I'm sorry, as an AI language model, I don't have enough context to understand the code snippet you provided. Can you please provide more details, such as the programming language, the purpose of the code, and the variables used?
相关推荐
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)