[Biopython-dev] [Bug 2361] Test Suite Failures from Martel/Sax with egenix mxTextTools 3.0
bugzilla-daemon at portal.open-bio.org
bugzilla-daemon at portal.open-bio.org
Thu Sep 13 08:04:16 EDT 2007
http://bugzilla.open-bio.org/show_bug.cgi?id=2361
------- Comment #22 from biopython-bugzilla at maubp.freeserve.co.uk 2007-09-13 08:04 EST -------
Following up comment 19, if the error handler in Tests/martel_support.py is
commented out, we can actually see the stack error triggered in
test_GenBankFormat.py as follows:
Traceback (most recent call last):
File
"C:\temp\biopython_cvs\biopython_all\biopython\Tests\test_GenBankFormat.py",
line 603, in -toplevel-
test_list.test()
File "C:\temp\biopython_cvs\biopython_all\biopython\Tests\martel_support.py",
line 41, in test
parser.parseString(s)
File "c:\python23\lib\site-packages\Martel\Parser.py", line 557, in
parseString
self.parseFile(strfile)
File "c:\python23\lib\site-packages\Martel\Parser.py", line 587, in parseFile
self._err_handler.fatalError(exc)
File "c:\python23\lib\xml\sax\handler.py", line 38, in fatalError
raise exception
ParserRecordException: Traceback (most recent call last):
File "c:\python23\lib\site-packages\Martel\Parser.py", line 578, in parseFile
header = header_reader.next()
File
"C:\TEMP\biopython_cvs\biopython_all\biopython\build\lib.win32-2.3\Martel\RecordReader.py",
line 413, in next
positions = _find_end_positions(lookahead, _tag_lines_tagtable)
File
"C:\TEMP\biopython_cvs\biopython_all\biopython\build\lib.win32-2.3\Martel\RecordReader.py",
line 239, in _find_end_positions
raise ReaderError("invalid format starting with %s" % repr(text[:50]))
ReaderError: invalid format starting with ''
This error is very similar to some of the others in the original bug report
(parsers we have since moved to pure python).
Looking at the stack for this in IDLE, the Martel.Parser.parseFile() function
has a cStringIO.StringI object as its fileobj variable.
I signed up to the egenix mailing list, and asked them to clarify what they
meant by "Removed support for buffer-compatible input objects" in their change
log, and specifically if this meant we can't use Python's StringIO handles?
The reply was:
> Yes, we had to do this as a result of the restructuring of the
> underlying code which no longer works on a char* pointer, but
> instead uses the object type information to see whether it needs
> to compile a Unicode tag table or a string one.
I suspect the use of StringIO / cStringIO in Biopython would explains most/all
of the Martel based test failures. I'm not sure if we can work around this...
--
Configure bugmail: http://bugzilla.open-bio.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the Biopython-dev
mailing list