Open mmartin9684-sil opened 3 months ago
I tried using different combinations of the stylesheet-field-update options and versions of Ruth with and without the \xt markers in \sr lines, and it seems that there's actually a couple issues. The \xt markers in the \sr lines is the reason it fails with the ignore option, although that's just because it's ignoring the project's custom stylesheet. When using either of the other two options (merge or replace), the issue with the \xr marker doesn't occur anymore since it's now using the project's custom stylesheet. However, instead there's an issue with the \b marker, and this is the same issue that motivated introducing the ignore option in the first place. The sample stack trace corresponds to this second issue.
Seeing as how I'm going to be replacing the USFM parser in SILNLP with the one from machine.py, I'll take a look at addressing this issue as part of that process.
Various USFM parsing errors occur when the translate script is run on a USFM file that uses cross-references (
\xt <text>\xt*
) as part of a section reference line (\sr <text>
). For instance, in the NASV project, these section header and section reference lines in the book of RUT will cause a parsing error:None of the stylesheet-field-update options (merge, ignore, replace) can be used to work around the parsing error.
As sample stack trace when this error occurs: