0

I keep getting the error "OSError: telling position disabled by next() call". I'm not calling next() anywhere in my code. Can anyone help me?

    def goto(self, line):
        with self.save as f:
            for ln in f:
                byte = f.tell()
                if ln != line:
                    f.seek(byte)
                elif ln == line:
                    return f.readline()

Any solutions to also give me a code (that is well commented please) of how to do a goto() function is also welcome

Thanks!

0 Answers0