This error occurs in function iter_slice(self, slice: slice) -> Iterator[Record].
Since python 3.5, when StopIteration is raised inside a generator, it is replaced with RuntimeError. The alternative is return. (See in https://www.python.org/dev/peps/pep-0479/)
I have verified this change.