command-not-found cannot access database

Bug #1827188 reported by Gerald Jansen
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
command-not-found
New
Undecided
Unassigned

Bug Description

command-not-found version: 0.3
Python version: 3.7.3 final 0
Distributor ID: Ubuntu
Description: Ubuntu 19.04
Release: 19.04
Codename: disco
Exception information:

unable to open database file
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/CommandNotFound/util.py", line 23, in crash_guard
    callback()
  File "/usr/lib/command-not-found", line 89, in main
    cnf = CommandNotFound.CommandNotFound(options.data_dir)
  File "/usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py", line 81, in __init__
    self.db = SqliteDatabase(dbpath)
  File "/usr/lib/python3/dist-packages/CommandNotFound/db/db.py", line 12, in __init__
    self.con = sqlite3.connect(filename)
sqlite3.OperationalError: unable to open database file

$ ls -l /var/lib/command-not-found
-rw-r----- 1 root root 3256320 May 1 11:05 commands.db
-rw-r----- 1 root root 1602 May 1 11:05 commands.db.metadata

Even after fixing the permissions, they revert after every aptitude update.

Revision history for this message
eric gundrum (ericgundrum) wrote :
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.