Why is this raising an error and not raising it in the previous function? I don't see any difference. It looks like you actually have a bug somewhere.