Page MenuHomePureOS Tracker

command-not-found crashes
Open, NormalPublic


Calling a function I wrote nim without ./, or calling any unknown command or commands for which I do not have the permissions to execute for that matter and I get the issue below. I ran 'sudo update-command-not-found' which runs fine with no response, but I repeatedly get the same error.

I'm pretty new to this, so there may be an easy fix, but I don't know what it is.

david@david-pc:~/googledrive/code/math$ nim
Could not find the database of available applications, run update-command-not-found as root to fix this
Sorry, command-not-found has crashed! Please file a bug report at:
Please include the following information with the report:

command-not-found version: 0.3
Python version: 3.7.3 final 0
Distributor ID: PureOS
Description: PureOS
Release: 9.0
Codename: amber
Exception information:

local variable 'cnf' referenced before assignment
Traceback (most recent call last):

File "/usr/share/command-not-found/CommandNotFound/", line 23, in crash_guard
File "/usr/lib/command-not-found", line 93, in main
  if not cnf.advise(args[0], options.ignore_installed) and not options.no_failure_msg:

UnboundLocalError: local variable 'cnf' referenced before assignment

Event Timeline

Wayne added a subscriber: Wayne.Jan 23 2020, 04:32

I think this is the same problem that has been mentioned before and was never fixed. You might wish to start here for more discussion.

Personally, I gave up and uninstalled it. As far as I know, I have not missed it.

louis added a subscriber: louis.Feb 24 2020, 17:31

@davidpluseipi Yep, this is the same problem. I don't think the package is maintained at the moment, so it's easier to uninstall it.

jeremiah.foster triaged this task as Normal priority.Oct 15 2020, 17:25