Full error message :
Traceback (most recent call last):
File "/usr/lib/calibre/calibre/gui2/device.py", line 88, in run
self.result = self.func(*self.args, **self.kwargs)
File "/usr/lib/calibre/calibre/gui2/device.py", line 506, in _books
mainlist = self.device.books(oncard=None, end_session=False)
File "/usr/lib/calibre/calibre/devices/kobo/driver.py", line 1772, in books
cursor.execute(query)
File "src/cursor.c", line 236, in resetcursor
CorruptError: CorruptError: database disk image is malformed