-
-
Notifications
You must be signed in to change notification settings - Fork 3
Can't parse Paratext project with empty tag <TranslationInfo /> #286
Copy link
Copy link
Open
Description
Running this command:
python3 -c "
from machine.corpora.file_paratext_project_settings_parser import FileParatextProjectSettingsParser
from pathlib import Path
FileParatextProjectSettingsParser(Path('/root/M/Paratext/projects/XXXX')).parse()
"
(I've XXXX'ed out the specific Paratext project here, because I'm not sure if it's sensitive or not - you can message me, and I can tell you the name of it.)
gives this error:
Traceback (most recent call last):
File "<string>", line 4, in <module>
File "/workspaces/silnlp/.venv/lib/python3.10/site-packages/machine/corpora/paratext_project_settings_parser_base.py", line 98, in parse
parent_name = translation_info_setting_parts[1] if translation_info_setting_parts[1] != "" else None
IndexError: list index out of range
This error is occurring because Settings.xml in the Paratext project has this empty tag: <TranslationInfo />. If I delete this line in Settings.xml, I don't get the error.
I originally ran into this using segment_verses.py in silnlp.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
🔖 Ready