Make sure iter_resource() returns an iterator object rather than an iterable.