PyConnector Iterator


#1

When I run sample.py it works fine. When I try to emulate the sample.py methodology, I get an error the first time I call iters[i].increment_to_next(). The error looks like this:

File “/opt/scidb/11.06/lib/libscidbpython.py”, line 657, in increment_to_next
def increment_to_next(self): return _libscidbpython.ConstIterator_increment_to_next(self)
IndexError: STD Exception

What does this error mean? I can’t figure out where the error is.

Thank you,
Alan


#2

I have found that the problem was, when I created an iterator class, that one of the variables I set in the init method was getting garbage collected by the time I called the next() method. As a result the array was getting garbage collected.

Thank you,
Alan