A couple of things in 2.x.
1. build-manifest and build-spine are now giving stack dumps on the same error that lint (and build-toc and other commands) pretty-prints.
Traceback (most recent call last):
File "/Users/vrice/setools/se/easy_xml.py", line 69, in __init__
self.etree = etree.fromstring(str.encode(xml_string))
File "src/lxml/etree.pyx", line 3237, in lxml.etree.fromstring
File "src/lxml/parser.pxi", line 1896, in lxml.etree._parseMemoryDocument
File "src/lxml/parser.pxi", line 1784, in lxml.etree._parseDoc
File "src/lxml/parser.pxi", line 1141, in lxml.etree._BaseParser._parseDoc
File "src/lxml/parser.pxi", line 615, in lxml.etree._ParserContext._handleParseResultDoc
File "src/lxml/parser.pxi", line 725, in lxml.etree._handleParseResult
File "src/lxml/parser.pxi", line 654, in lxml.etree._raiseParseError
File "<string>", line 64
lxml.etree.XMLSyntaxError: Opening and ending tag mismatch: p line 51 and section, line 64, column 14
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/Users/vrice/setools/se/se_epub.py", line 411, in get_dom
self._dom_cache[file_path_str] = se.easy_xml.EasyXmlTree(file_contents)
File "/Users/vrice/setools/se/easy_xml.py", line 71, in __init__
raise se.InvalidXmlException(f"Couldn’t parse XML. Exception: {ex}") from ex
se.InvalidXmlException: Couldn’t parse XML. Exception: Opening and ending tag mismatch: p line 51 and section, line 64, column 14 (<string>, line 64)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/bin/se", line 33, in <module>
sys.exit(load_entry_point('standardebooks', 'console_scripts', 'se')())
File "/Users/vrice/setools/se/main.py", line 81, in main
sys.exit(getattr(module, command_function)(args.plain_output))
File "/Users/vrice/setools/se/commands/build_manifest.py", line 40, in build_manifest
node.replace_with(se_epub.generate_manifest())
File "/Users/vrice/setools/se/se_epub.py", line 922, in generate_manifest
dom = self.get_dom(file_path)
File "/Users/vrice/setools/se/se_epub.py", line 423, in get_dom
raise se.InvalidXhtmlException(f"Couldn’t parse XML in [path][link=file://{file_path.resolve()}]{file_path}[/][/]. Exception: {ex.__cause__}") from ex
se.InvalidXhtmlException: Couldn’t parse XML in [path][link=
file:///Users/vrice/Library/Mobile Documents/com~apple~CloudDocs/Books/willa-cather_one-of-ours/src/epub/text/chapter-1-19.xhtml]/Users/vrice/Library/Mobile Documents/com~apple~CloudDocs/Books/willa-cather_one-of-ours/src/epub/text/chapter-1-19.xhtml[/][/]. Exception: Opening and ending tag mismatch: p line 51 and section, line 64, column 14 (<string>, line 64)
It was too late to try to figure out why; I’ll try to look at it this weekend if you don’t get to it first.
2. When doing a build, e.g. se build -c ., any error apparently no longer saves the standard .epub (the advanced .epub is saved). This is … annoying. I routinely build the epub before I have cover art, and consequently I get the "COVER_ARTIST_WIKI_URL could not be found” error. But until now, I still got an epub, which is good, because I don’t care about that error at this point. But with 2.x, we no longer get an epub, so I have to run build again with the check to get one. Why are epubcheck errors causing the epub to be deleted?