Based on the error message you are trying to unpack an int, which doesn’t work:
def fun():
    return 1

a, b = fun()
> TypeError: cannot unpack non-iterable int object

However, your code also doesn’t show any return statement in step(), so I’m unsure if you’ve changed the code already.
In any case, a missing return statement would return a None object by default, so the error should say:
TypeError: cannot unpack non-iterable NoneType object