try to len a generator seems will raise an error