python "need more than 1 value to unpack"

Trying to run a script from "Learn Python the hard way" and getting this error, tried several things but I'm kinda stuck. Seen similar errors with people using argv and not enough arguments when running the script

In your code, convert() returns a list, which is one object, or value. By doing question, answer = convert(snippet, phrase), you are expecting two values to be returned, and then inserted into question and answer.

Solution

You should a change

question, answer = convert(snippet, phrase)

to

results = convert(snippet, phrase)

You can then get question and answer from results(assuming they are at indices 0 and 1) by doing

question = results[0]
answer = results[1]

Email codedump link for python &quot;need more than 1 value to unpack&quot;