Details
-
Type: Bug
-
Status: Closed (View Workflow)
-
Priority: Major
-
Resolution: Upstream Problem
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: usfm2osis.py
-
Labels:None
Description
I haven't been able to isolate it in the files yet, but something (and I'm guessing footnote processing) causes the script to give an error (and then normally require manual intervention to exit the program).
I'm presuming that the desired behaviour would be to ignore the (presumably bad) footnote and continue to process the rest of the file?
Traceback (most recent call last):
File "sword-tools/modules/python/usfm2osis.patched.py", line 1559, in <module>
osisSegment[job] = convertToOsis(job)
File "sword-tools/modules/python/usfm2osis.patched.py", line 1334, in convertToOsis
osis = cvtFootnotes(osis, relaxedConformance)
File "sword-tools/modules/python/usfm2osis.patched.py", line 851, in cvtFootnotes
osis = re.sub(r'\\f\s+([^\s\\])?\s*(.?)\s*
f*', lambda m: '<note' + ((' n=""') if (m.group(1) == '-') else ('' if (m.group(1) == '+') else (' n="' + m.group(1) + '"'))) + ' placement="foot">' + m.group(2) + '\uFDDF</note>', osis, flags=re.DOTALL)
File "/usr/lib/python2.7/re.py", line 151, in sub
return _compile(pattern, flags).sub(repl, string, count)
File "sword-tools/modules/python/usfm2osis.patched.py", line 851, in <lambda>
osis = re.sub(r'\\f\s+([^\s\\])?\s*(.?)\s*
f*', lambda m: '<note' + ((' n=""') if (m.group(1) == '-') else ('' if (m.group(1) == '+') else (' n="' + m.group(1) + '"'))) + ' placement="foot">' + m.group(2) + '\uFDDF</note>', osis, flags=re.DOTALL)
TypeError: coercing to Unicode: need string or buffer, NoneType found