AttributeError: CommandNotFound instance has no attribute 'priority_overrides'

Bug #359784 reported by Neal Crook
2
Affects Status Importance Assigned to Milestone
command-not-found (Ubuntu)
Fix Released
Undecided
Michael Vogt

Bug Description

Binary package hint: command-not-found

user@machine:~$ mysql
Sorry, command-not-found has crashed! Please file a bug report at:
https://bugs.launchpad.net/ubuntu/+source/command-not-found
Please include the following information with the report:

command-not-found version: 0.2.21
Python version: 2.6.2 final 0
Distributor ID: Ubuntu
Description: Ubuntu jaunty (development branch)
Release: 9.04
Codename: jaunty
Exception information:

CommandNotFound instance has no attribute 'priority_overrides'
Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/CommandNotFound/util.py", line 32, in crash_guard
    callback()
  File "/usr/lib/command-not-found", line 24, in main
    CommandNotFound(options.data_dir).advise(args[0], options.ignore_installed)
  File "/usr/lib/python2.6/dist-packages/CommandNotFound/CommandNotFound.py", line 163, in advise
    packages.sort(self.sortByComponent)
  File "/usr/lib/python2.6/dist-packages/CommandNotFound/CommandNotFound.py", line 103, in sortByComponent
    if (x[0] in self.priority_overrides and
AttributeError: CommandNotFound instance has no attribute 'priority_overrides'
bash: mysql: command not found

but, "in general" command-not-found works correctly. For example:

user@machine:~$ foobar
bash: foobar: command not found
user@machine:~$ gnat
The program 'gnat' is currently not installed. You can install it by typing:
sudo apt-get install gnat-4.3
bash: gnat: command not found

Neal.

Revision history for this message
Neal Crook (neal-pippaluk) wrote :

Update 14Apr2009
I think command-not-found must have been kidding about its version number; I started with a Jaunty beta6 cd install, which claims to contain command-not-found 0.2.33ubuntu1 (NOT 0.2.21 as command-not-found claimed). Anyhow, after an upgrade to 0.2.34ubuntu2 the problem has vanished.

Neal.

Michael Vogt (mvo)
Changed in command-not-found (Ubuntu):
assignee: nobody → Michael Vogt (mvo)
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package command-not-found - 0.2.36ubuntu1

---------------
command-not-found (0.2.36ubuntu1) karmic; urgency=low

  * scan.data: updated to current karmic
  * scan.data: add exception for gftp (LP: #99708)
  * debian/postinst:
    - if old/leftover /etc/bash_command_found_found is there,
      remove it (LP: #379851)
  * debian/rules:
    - build with DH_PYCENTRAL=include-links LP: #342003
  * CommandNotFound/util.py:
    - use try gettext if lgettext fails (LP: #282446)
  * debian/copyright:
    - fix location (LP: #314478)
  * CommandNotFound/CommandNotFound.py:
    - be more robust about missing priority.txt (LP: #359784)
    - add simple spelling correction (LP: #314486)
  * debian/control:
    - build for all python versions (LP: #366096)

 -- Michael Vogt <email address hidden> Fri, 26 Jun 2009 13:58:24 +0200

Changed in command-not-found (Ubuntu):
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.