openlp-core team mailing list archive
-
openlp-core team
-
Mailing list archive
-
Message #21900
[Bug 1223644] Re: OpenLP fails to start if python-uno throws an exception
The actual problem is that UNO hacks __import__ and causes endless
issues for us as developers, which we just smooth over for end users.
UNO should not hack __import__.
Also, the original report said that OpenLP should show some error
dialog. At the stage that the exception is occurring, /there is no GUI/
and I am doubtful as to OpenLP's ability to show a dialog at such an
early phase in the application startup.
Lastly, I am not going to go and program around everyone else's bad
bugs. This would mean that OpenLP development would be even slower, and
I don't care for cleaning up other people's messes.
** Changed in: openlp/trunk
Importance: High => Medium
** Changed in: openlp/2.0
Importance: High => Medium
** Changed in: openlp
Importance: High => Medium
--
You received this bug notification because you are a member of OpenLP
Core, which is subscribed to OpenLP.
https://bugs.launchpad.net/bugs/1223644
Title:
OpenLP fails to start if python-uno throws an exception
Status in OpenLP - Worship Presentation Software:
New
Status in OpenLP 2.0 series:
Won't Fix
Status in OpenLP trunk series:
Won't Fix
Bug description:
As of OpenLP 2.0.2, the startup code is unable to handle external
errors which cause python-uno to throw exceptions. In this particular
instance,
Current behavior:
After running OpenLP with the option "-l debug", the following stack trace is logged:
File "/usr/bin/openlp", line 44, in <module>
main()
File "/usr/share/openlp/openlp/core/__init__.py", line 342, in main
sys.exit(app.run(qt_args))
File "/usr/share/openlp/openlp/core/__init__.py", line 150, in run
self.mainWindow = MainWindow(self)
File "/usr/share/openlp/openlp/core/ui/mainwindow.py", line 685, in __init__
self.pluginManager.find_plugins(plugin_path, self.pluginHelpers)
File "/usr/share/openlp/openlp/core/lib/pluginmanager.py", line 121, in find_plugins
plugin = p(plugin_helpers)
File "/usr/share/openlp/openlp/plugins/custom/customplugin.py", line 54, in __init__
self.manager = Manager(u'custom', init_schema)
File "/usr/share/openlp/openlp/core/lib/db.py", line 229, in __init__
self.session = init_schema(self.db_url)
File "/usr/share/openlp/openlp/plugins/custom/lib/db.py", line 61, in init_schema
session, metadata = init_db(url)
File "/usr/share/openlp/openlp/core/lib/db.py", line 64, in init_db
engine = create_engine(url, poolclass=NullPool)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/__init__.py", line 321, in create_engine
return strategy.create(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py", line 64, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 276, in dbapi
from pysqlite2 import dbapi2 as sqlite
File "/usr/lib/python2.7/dist-packages/uno.py", line 334, in _uno_import
"%s (or '%s.%s' is unknown)" % (py_import_exc, name, x)
AttributeError: 'exceptions.ImportError' object has no attribute 'with_traceback'
Expected behavior:
OpenLP should provide the user with an error dialog before crashing with a message such as "OpenLP is unable to connect to the LibreOffice database".
If it is reasonable, add workaround code to allow OpenLP to continue without using the plugin which triggered the external exception.
Environment notes:
OpenLP 2.0.2
Ubuntu 12.04
Libre Office 4.1.1
To manage notifications about this bug go to:
https://bugs.launchpad.net/openlp/+bug/1223644/+subscriptions
References