Oops! OpenLP hit a problem and couldn't recover. - repeatedly.

I keep getting the same error.

I have 'done the right thing', as far as I know, and sent the email to the developers with the description of what I was doing. That is, saving, or trying to, a song. It asked to attach any files which triggered the problem. However, I can't do that because I can't save the song.

But I copied the text of the song and put it into a new song and I get the same error. I can't see any odd-looking characters in the text, but maybe that's because I've been looking at the same text for half a day!

What, if anything, can I do to assist you developers? 

This is what's in the bottom box of the error reporting window.

Traceback (most recent call last):
File "openlp/plugins/songs/forms/editsongform.py", line 991, in accept
File "openlp/plugins/songs/forms/editsongform.py", line 1027, in save_song
File "openlp/plugins/songs/forms/editsongform.py", line 312, in _process_lyrics
File "openlp/plugins/songs/lib/openlyricsxml.py", line 142, in dump_xml
File "src/lxml/lxml.etree.pyx", line 3258, in lxml.etree.dump (src/lxml/lxml.etree.c:78442)
UnicodeEncodeError: 'ascii' codec can't encode character '\u2019' in position 544: ordinal not in range(128)

Let me know how I can help, please.

But I also need to know what I can do to be able to save this hymn for Sunday. (And being in Australia, that means that I have less time before Sunday comes around than most of you other people!)

Cheers,

Andrew

Comments

  • @AndrewK it appears you are importing a song using openlyrics.  It also appears there is a special character in the XML....or maybe maybe I am wrong..... 

    You didn't mention what OS your running or what version of OpenLP....but something I have found helps with strange paste issues like this is to copy the song text and paste it into a text editor.  On windows I would use notepad....the original....remember the dumber the better for the text editor! 

    Then copy the text from the text editor and paste it into the edit song form.  You can do this all at once and try to save it....if it works then you can break up the song in the edit song form.

    If your still having issues, try creating the song one verse at a time and save it after adding each verse....When you hit the problem area, try typing that one verse into the edit form.

    Why all this round about way?  The form is not happy with one character....notepad normally only keeps "valid" characters...the rest just go away when you paste into it!

    Give it a try and let us know how it works....if not, I can work with you to get the song loaded! 
  • Thanks, @JohnM.

    I thought about a couple of the things that you mentioned after I had posted (and also gone to bed). I’m on Mac OS and the version of OpenLP is 2.4.6

    What you said about pasting the text into a ’dumb‘ text editor makes sense to me. I wish that I had thought more about the error and not waited for you to have interpreted the error message for me. The text is from an OCR, so it’s quite likely that there are extraneous characters in it. But the OpenLP editor doesn’t show them. There’s no way (that I have found) to get it to display anything but the text. Sometimes, for example, I have wanted to see if there are line breaks or hard returns, but I can’t see that, as far as I know. Anyway, that’s beside the point of this exercise.

    I tried a couple of text editors and one other method of stripping invalid characters, all to no avail. OpenLP continued to crash when saving the song. Interestingly, I could see a larger than usual line break in the last verse of that song. I tried a couple of things, such as deleting all of the line breaks so that I ended up with one long line for that last verse,  to get rid of that break. However, as soon as I re-inserted line breaks - hard or soft returns - that larger than usual line break reappeared. No idea what or why.

    I decided finally that I would delete the last verse and chorus and attempt to save the song. That worked, and I wasn't surprised. It was easy then to re-type that last verse and chorus (it has a different chorus for the last verse, of course!) and I was then able to save the song successfully.

    Thanks for your help. Much appreciated.
    Andrew
Sign In or Register to comment.