python3 'generator' object has no attribute 'next' code example
Example: AttributeError: 'generator' object has no attribute 'next'
In pythpn 3.x, there is no longer a .next method attached to iterator;
If you have a function that returns an iterator, call the function and pass the result to the next() function
next(anIterator)
next(a_function_that_returns_an_iterator())