Python ValueError: Need More Than XX Values to Unpack

this error seems you did not return the same number of results for example:
1
2
3
def fun():
return 1
a,b = fun()

this will throw Exception : ValueError: need more than 2 values to unpack
change code:

1
2
3
def fun():
return 1,2
a,b = fun()

then ok!