Error handling breaks when the parsed text is binary.
The resulting error is: parsimonious.exceptions.IncompleteParseError: <exception str() failed>.
This is caused because self.text.count('\n', 0, self.pos) needs a binary string for binary text.
Generally getting the line where the error occured does not make for a binary file.
Error handling breaks when the parsed text is binary. The resulting error is:
parsimonious.exceptions.IncompleteParseError: <exception str() failed>
. This is caused becauseself.text.count('\n', 0, self.pos)
needs a binary string for binary text. Generally getting the line where the error occured does not make for a binary file.