OpenLP crashes when no databases exists

Bug #835427 reported by Andreas Preikschat
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenLP
Fix Released
Critical
Tim Bentley

Bug Description

Hello,

trunk 1726, arch linux

1) Close OpenLP if it is running and go to the openlp data folder.
2) Rename the folder (or delete it)
3) Start OpenLP (-l debug -d)

Result:
OpenLP does not start, instead if crashes.

Traceback (most recent call last):
  File "openlp.pyw", line 281, in <module>
    main()
  File "openlp.pyw", line 275, in main
    sys.exit(app.run(qt_args))
  File "openlp.pyw", line 124, in run
    self.mainWindow = MainWindow(self.clipboard(), self.args)
  File "/home/andreas/Projekte/openlp/trunk/openlp/core/ui/mainwindow.py", line 622, in __init__
    self.pluginManager.find_plugins(pluginpath, self.pluginHelpers)
  File "/home/andreas/Projekte/openlp/trunk/openlp/core/lib/pluginmanager.py", line 103, in find_plugins
    plugin = p(plugin_helpers)
  File "/home/andreas/Projekte/openlp/trunk/openlp/plugins/songusage/songusageplugin.py", line 50, in __init__
    self.manager = Manager(u'songusage', init_schema, upgrade_mod=upgrade)
  File "/home/andreas/Projekte/openlp/trunk/openlp/core/lib/db.py", line 194, in __init__
    db_ver, up_ver = upgrade_db(self.db_url, upgrade_mod)
  File "/home/andreas/Projekte/openlp/trunk/openlp/core/lib/db.py", line 83, in upgrade_db
    tables = upgrade.upgrade_setup(metadata)
  File "/home/andreas/Projekte/openlp/trunk/openlp/plugins/songusage/lib/upgrade.py", line 44, in upgrade_setup
    u'songusage_data': Table(u'songusage_data', metadata, autoload=True)
  File "/usr/lib/python2.7/site-packages/sqlalchemy/schema.py", line 265, in __new__
    table._init(name, metadata, *args, **kw)
  File "/usr/lib/python2.7/site-packages/sqlalchemy/schema.py", line 335, in _init
    self, include_columns
  File "/usr/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2220, in run_callable
    return conn.run_callable(callable_, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1853, in run_callable
    return callable_(self, *args, **kwargs)
  File "/usr/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 254, in reflecttable
    return insp.reflecttable(table, include_columns)
  File "/usr/lib/python2.7/site-packages/sqlalchemy/engine/reflection.py", line 417, in reflecttable
    raise exc.NoSuchTableError(table.name)
NoSuchTableError: songusage_data
None

This the traceback shown for the songusge_data, but also affects the songs plugin.

Cheers

Related branches

Tim Bentley (trb143)
Changed in openlp:
status: New → Fix Committed
assignee: nobody → Tim Bentley (trb143)
Tim Bentley (trb143)
Changed in openlp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.