错误显示
ValueError: too many values to unpack (expected 5) During handling of the above, another exception occurred:
错误代码
dict = {}
for i in dict():
pass
解决办法
1 是否在遍历字典的时候没有使用items;
dict = {}
for i in dict.items():
pass
2 在调用函数的时候,如果函数返回值是5个,而你只写了3个的话,也会报这个错误,所以将所以的返回值都写出来,不管你用还是不用。
问题解决!!
参考