TypeError: unorderable types: int() < NoneType()

Issue #30 new
Andrei Sura created an issue

I encountered the following

while current_row_in_file_index < row_count: TypeError: unorderable types: int() < NoneType()

It seems related to the fact that in some cases row_count resolves to None:

line 590 row_count = self.header.properties.row_count

Comments (1)

  1. Matt

    I saw similar behavior. After __init__ cached_page was blank and it hadn’t read the row_count. I don’t know if this is the proper solution but for me I was able to resolve by simply caching the first page after the header. I added the following lines to the end of init

        if self.properties.row_count is None:
            if self.cached_page == b'':
                self._file.seek(self.properties.header_length)
                self._read_next_page()
    

  2. Log in to comment