← Back to team overview

openlp-core team mailing list archive

[Bug 1621273] Re: Formatting tags cause traceback

 

Could not reproduce the first traceback, but it looks like the line in
question has been modified since this report.

I can confirm the second traceback.

http://bazaar.launchpad.net/~openlp-
core/openlp/trunk/view/head:/openlp/plugins/songs/lib/openlyricsxml.py#L461

in trunk:
    text = text.replace('{{{tag}}}'.format(tag=tag), '</tag>')

should be:
    text = text.replace('{{/{tag}}}'.format(tag=tag), '</tag>')


anybody feel free to have this as a freebie (im not in a position to fix it myself!)

-- 
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1621273

Title:
  Formatting tags cause traceback

Status in OpenLP:
  New

Bug description:
  Adding formatting tag to a song and sending it to Live. Win 10 | trunk
  2695

  Traceback (most recent call last):
    File "E:\bzr\openlp\force-split\openlp\core\lib\mediamanageritem.py", line 466, in on_double_clicked
      self.on_live_click()
    File "E:\bzr\openlp\force-split\openlp\core\lib\mediamanageritem.py", line 507, in on_live_click
      self.go_live()
    File "E:\bzr\openlp\force-split\openlp\core\lib\mediamanageritem.py", line 528, in go_live
      service_item = self.build_service_item(item, remote=remote)
    File "E:\bzr\openlp\force-split\openlp\core\lib\mediamanageritem.py", line 626, in build_service_item
      if self.generate_slide_data(service_item, item, xml_version, remote, context):
    File "E:\bzr\openlp\force-split\openlp\plugins\songs\lib\mediaitem.py", line 611, in generate_slide_data
      service_item.xml_version = self.open_lyrics.song_to_xml(song)
    File "E:\bzr\openlp\force-split\openlp\plugins\songs\lib\openlyricsxml.py", line 322, in song_to_xml
      lines_element = self._add_text_with_tags_to_lines(verse_element, optional_verse, tags_element)
    File "E:\bzr\openlp\force-split\openlp\plugins\songs\lib\openlyricsxml.py", line 461, in _add_text_with_tags_to_lines
      text = text.replace('{/{tag}}}'.format(tag=tag), '</tag>')
  ValueError: unexpected '{' in field name

  
  Another traceback:

  Traceback (most recent call last):
    File "E:\bzr\openlp\remove-escape-item\openlp\core\lib\mediamanageritem.py", line 466, in on_double_clicked
      self.on_live_click()
    File "E:\bzr\openlp\remove-escape-item\openlp\core\lib\mediamanageritem.py", line 508, in on_live_click
      self.go_live()
    File "E:\bzr\openlp\remove-escape-item\openlp\core\lib\mediamanageritem.py", line 529, in go_live
      service_item = self.build_service_item(item, remote=remote)
    File "E:\bzr\openlp\remove-escape-item\openlp\core\lib\mediamanageritem.py", line 627, in build_service_item
      if self.generate_slide_data(service_item, item, xml_version, remote, context):
    File "E:\bzr\openlp\remove-escape-item\openlp\plugins\songs\lib\mediaitem.py", line 611, in generate_slide_data
      service_item.xml_version = self.open_lyrics.song_to_xml(song)
    File "E:\bzr\openlp\remove-escape-item\openlp\plugins\songs\lib\openlyricsxml.py", line 322, in song_to_xml
      lines_element = self._add_text_with_tags_to_lines(verse_element, optional_verse, tags_element)
    File "E:\bzr\openlp\remove-escape-item\openlp\plugins\songs\lib\openlyricsxml.py", line 464, in _add_text_with_tags_to_lines
      element = etree.XML('<lines>{text}</lines>'.format(text=text))
    File "src\lxml\lxml.etree.pyx", line 3192, in lxml.etree.XML (src\lxml\lxml.etree.c:76452)
    File "src\lxml\parser.pxi", line 1830, in lxml.etree._parseMemoryDocument (src\lxml\lxml.etree.c:115104)
    File "src\lxml\parser.pxi", line 1711, in lxml.etree._parseDoc (src\lxml\lxml.etree.c:113680)
    File "src\lxml\parser.pxi", line 1051, in lxml.etree._BaseParser._parseUnicodeDoc (src\lxml\lxml.etree.c:107850)
    File "src\lxml\parser.pxi", line 584, in lxml.etree._ParserContext._handleParseResultDoc (src\lxml\lxml.etree.c:102153)
    File "src\lxml\parser.pxi", line 694, in lxml.etree._handleParseResult (src\lxml\lxml.etree.c:103803)
    File "src\lxml\parser.pxi", line 624, in lxml.etree._raiseParseError (src\lxml\lxml.etree.c:102715)
    File "<string>", line None
  lxml.etree.XMLSyntaxError: Opening and ending tag mismatch: tag line 1 and lines, line 1, column 230

To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1621273/+subscriptions


References