openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #09477
Re: [Merge] lp:~gerald-britton/openlp/newbugs into lp:openlp
Hmmm... I cannot test with Windows 7 so I'll need your help (or
someone's). From what I can see after a quick look, the error message
is produced before any code in my patch is executed. More precisely,
in importer.py at line 46, I see:
try:
from sofimport import SofImport
HAS_SOF = True
except ImportError:
HAS_SOF = False
Then later (line 152):
SongFormat.set_availability(SongFormat.SongsOfFellowship, HAS_SOF)
If the import fails, then HAS_SOF will be set to False, which will
trigger the error. (The error message seems to be incorrect in this
case. It assumes that OpenOffice cannot be found but there could be
other causes.) However, since the import is in a try/except clause,
we cannot see the cause of the import failure. Would you be able to
change the try/except to something like:
######### let's see what the error is! ######
import logging
log = logging.getLogger(__name__)
try:
from sofimport import SofImport
HAS_SOF = True
except ImportError as exc:
HAS_SOF = False
log.exception('from sofimport import SofImport failed, reason: %s', exc)
###### Look in the log for the error and original exception ###
Then, can you retest and see what pops up in the log?
FWIW, we should probably log exceptions for all failures of this sort
so we can debug easier. Note to self: Add to the to-do list!
On Sun, May 29, 2011 at 11:07 AM, Jonathan Corwin <j@xxxxxxxxxxxx> wrote:
> LibreOffice 3.3 on Windows 7.
>
> Start OpenLP. Go to File -> Import -> Song. Click Next. Select Songs of Fellowship.
> You see the message that Songs of Fellowship has been disabled.
>
> See the screen shot: http://imageshack.us/f/101/sofproblems.png/
> First is of this branch SoF
> Second is this branch Generic Import.
> Third is trunk SoF import.
>
> --
> https://code.launchpad.net/~gerald-britton/openlp/newbugs/+merge/62780
> You are the owner of lp:~gerald-britton/openlp/newbugs.
>
--
Gerald Britton
https://code.launchpad.net/~gerald-britton/openlp/newbugs/+merge/62780
Your team OpenLP Core is subscribed to branch lp:openlp.
References