And the problem is in the plugin Clean Comments. That has:
Code:
def build_menus(self):
m = self.menu
m.clear()
candidate = self.gui.library_path
db = LibraryDatabase (candidate)
I don't know why it is doing that as it doesn't actually use the database in that, or the other method. Where it does use the database, it connects to it properly.
Removing the last two lines, plus the similar ones elsewhere, fixes the problem.
And I have posted a fixed version in the plugins thread.