X_TEST, Y_TEST = test_iter.next() AttributeError: 'generator' object has no attribute 'next' Maybe I should make a loop with the iterator?