Songs with mismatching formatting tags still throw an exception
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
OpenLP | Status tracked in Trunk | |||||
2.0 |
Fix Released
|
High
|
Oliver Wieland | |||
Trunk |
Fix Released
|
High
|
Samuel Mehrbrodt |
Bug Description
There is another bug similar to this, bug #885874, but it does not seem to have fixed the issue below. Note that there is a mismatched "{/g}" tag which causes this error.
Version: {u'full': u'2.0.1', u'version': u'2.0.1', u'build': None}
--- Details of the Exception. ---
Hi,
I just found one bug. I just changed one Bridge to:
Shine Your light and {g}Strahle hell und{/g}
Let the whole world see {g}lass die Welt es sehn.{/g}
We're singing {g}Wir singen{/g}
For the glory Of the risen King{/g} {g}dir zur Ehre, auferstandner Herr.{/g}
Jesus
And got this error:
--- Exception Traceback ---
Traceback (most recent call last):
File
"/usr/lib/
line 393, in onEditClick
self.onSongList
File
"/usr/lib/
line 254, in onSongListLoad
item = self.buildServi
File
"/usr/lib/
591, in buildServiceItem
if self.generateSl
File
"/usr/lib/
line 529, in generateSlideData
service_
File "/usr/lib/
line 361, in song_to_xml
optional_verse, tags_element)
File "/usr/lib/
line 503, in _add_text_
element = etree.XML
File "lxml.etree.pyx", line 2512, in lxml.etree.XML
(src/lxml/
File "parser.pxi", line 1545, in lxml.etree.
(src/lxml/
File "parser.pxi", line 1417, in lxml.etree.
(src/lxml/
File "parser.pxi", line 898, in
lxml.etree.
File "parser.pxi", line 539, in
lxml.etree.
(src/lxml/
File "parser.pxi", line 625, in lxml.etree.
(src/lxml/
File "parser.pxi", line 565, in lxml.etree.
(src/lxml/
XMLSyntaxError: Opening and ending tag mismatch: lines line 1 and tag,
line 1, column 216
--- System information ---
Plattform: Linux-2.
Desktop: GNOME
--- Library Versions ---
Python: 2.6.5
Qt4: 4.6.2
Phonon: 4.3.1
PyQt4: 4.7.2
QtWebkit: 532.4
SQLAlchemy: 0.5.8
SQLAlchemy Migrate: < 0.7
BeautifulSoup: 3.1.0.1
lxml: 2.2.4
Chardet: 2.0.1
PyEnchant: 1.5.3
PySQLite: 1.0.1
Mako: 0.2.5
pyUNO bridge: 3.2
Related branches
- Tim Bentley: Approve
- Raoul Snyman: Approve
-
Diff: 65 lines (+46/-0)1 file modifiedopenlp/plugins/songs/forms/editsongform.py (+46/-0)
- Raoul Snyman: Approve
- Tim Bentley: Approve
-
Diff: 856 lines (+187/-63)39 files modified.bzrignore (+1/-0)
README.txt (+5/-6)
openlp/core/ui/aboutdialog.py (+1/-1)
openlp/core/ui/exceptiondialog.py (+2/-1)
openlp/core/ui/filerenamedialog.py (+2/-1)
openlp/core/ui/firsttimelanguagedialog.py (+2/-0)
openlp/core/ui/firsttimewizard.py (+2/-0)
openlp/core/ui/formattingtagdialog.py (+1/-0)
openlp/core/ui/mainwindow.py (+1/-1)
openlp/core/ui/plugindialog.py (+2/-0)
openlp/core/ui/printservicedialog.py (+1/-0)
openlp/core/ui/serviceitemeditdialog.py (+2/-0)
openlp/core/ui/settingsdialog.py (+1/-1)
openlp/core/ui/shortcutlistdialog.py (+1/-0)
openlp/core/ui/starttimedialog.py (+2/-0)
openlp/core/ui/themelayoutdialog.py (+2/-0)
openlp/core/ui/themewizard.py (+1/-0)
openlp/core/ui/wizard.py (+1/-0)
openlp/plugins/alerts/forms/alertdialog.py (+1/-1)
openlp/plugins/bibles/forms/booknamedialog.py (+2/-0)
openlp/plugins/bibles/forms/editbibledialog.py (+1/-1)
openlp/plugins/bibles/forms/languagedialog.py (+2/-0)
openlp/plugins/bibles/lib/mediaitem.py (+16/-1)
openlp/plugins/custom/forms/editcustomdialog.py (+1/-1)
openlp/plugins/custom/forms/editcustomslidedialog.py (+2/-1)
openlp/plugins/songs/forms/authorsdialog.py (+1/-1)
openlp/plugins/songs/forms/editsongdialog.py (+1/-1)
openlp/plugins/songs/forms/editsongform.py (+50/-0)
openlp/plugins/songs/forms/editversedialog.py (+1/-0)
openlp/plugins/songs/forms/mediafilesdialog.py (+1/-1)
openlp/plugins/songs/forms/songbookdialog.py (+2/-1)
openlp/plugins/songs/forms/songmaintenancedialog.py (+1/-0)
openlp/plugins/songs/forms/topicsdialog.py (+2/-1)
openlp/plugins/songs/lib/sundayplusimport.py (+8/-8)
openlp/plugins/songs/lib/xml.py (+2/-2)
openlp/plugins/songusage/forms/songusagedeletedialog.py (+2/-0)
openlp/plugins/songusage/forms/songusagedetaildialog.py (+1/-0)
tests/functional/openlp_core_lib/test_ui.py (+59/-32)
tests/utils/test_bzr_tags.py (+1/-0)
I think the problem is, that the method '_get_missing_tags' only checks for 'not closed' tags, but not for 'not opened'.
I'm nearly a Phyton newbie, therefore I don't understand the complete code around this method and the following calls in 'song_to_xml', so I'm sorry that i cannot fix the problem for myself.