-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception on invalid xml. #145
Comments
Merged
The problem occurs with general xml parsing failures. E.g. the unrecognized |
rillian
changed the title
Exception on garbage at the start of an xml file.
Exception on invalid xml.
Jun 4, 2019
Yes, this seems like something that would need work. The XML parsing vs. Capitains Parsing is something that has remained in the codebase for a long time. Feel free to propose a fix, including by creating a new exception :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Some logging output got into my tei files, and hooktest asserts rather than reporting the error:
One may reproduce by prepending the string 'Garbage text\n' to e.g. the beginning of
tests/repo1/data/hafez/divan/hafez.divan.perseus-eng1.xml
.The
XMLSyntaxError
is hidden by theimap_unordered
call through the threadpool and presents instead as aMaybeEncodingError
becauselxml.etree
can't pickle its_ListErrorLog
. Flattening the parallel iterator to a serial one reveals the underlying issue.The text was updated successfully, but these errors were encountered: