Bug 1048402 - [abrt] dnf: cli.py:1521:search:AttributeError: 'module' object has no attribute 'exception'
[abrt] dnf: cli.py:1521:search:AttributeError: 'module' object has no attribu...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
20
x86_64 Unspecified
urgent Severity urgent
: ---
: ---
Assigned To: Ales Kozumplik
Fedora Extras Quality Assurance
https://retrace.fedoraproject.org/faf...
abrt_hash:7743f4064bea334b21f861bf341...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-03 18:41 EST by autarch princeps
Modified: 2014-09-30 19:41 EDT (History)
11 users (show)

See Also:
Fixed In Version: dnf-0.4.11-1.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-11 03:47:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (1.24 KB, text/plain)
2014-01-03 18:41 EST, autarch princeps
no flags Details
File: environ (2.02 KB, text/plain)
2014-01-03 18:41 EST, autarch princeps
no flags Details

  None (edit)
Description autarch princeps 2014-01-03 18:41:19 EST
Description of problem:
search for package with dnf with no results found.

Version-Release number of selected component:
dnf-0.4.10-1.fc20

Additional info:
reporter:       libreport-2.1.10
cmdline:        /usr/bin/python /bin/dnf search sse4
executable:     /bin/dnf
kernel:         3.12.6-300.fc20.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
cli.py:1521:search:AttributeError: 'module' object has no attribute 'exception'

Traceback (most recent call last):
  File "/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 240, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 63, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 122, in _main
    cli.run()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1456, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/commands.py", line 988, in run
    return self.cli.search(extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1521, in search
    raise dnf.exception.Error(_('No Matches found'))
AttributeError: 'module' object has no attribute 'exception'

Local variables in innermost frame:
args: ['sse4']
ns_only: False
dups: False
search_all: False
counter: {}
limit: <dnf.query.Query object at 0x1e06c80>
_print_match_section: <function _print_match_section at 0x1e19cf8>
arg: 'sse4'
section_text: u'Treffer: %s'
self: <dnf.cli.cli.Cli object at 0x1d74850>
matched_needles: None
Comment 1 autarch princeps 2014-01-03 18:41:28 EST
Created attachment 845130 [details]
File: backtrace
Comment 2 autarch princeps 2014-01-03 18:41:34 EST
Created attachment 845131 [details]
File: environ
Comment 3 Filipe Rosset 2014-01-03 20:10:57 EST
Also reproducible here:

[root@localhost ~]# dnf search libxfconf
Warning: No matches found for: libxfconf
Traceback (most recent call last):
  File "/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 240, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 63, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 122, in _main
    cli.run()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1456, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/commands.py", line 988, in run
    return self.cli.search(extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1521, in search
    raise dnf.exception.Error(_('No Matches found'))
AttributeError: 'module' object has no attribute 'exception'
[root@localhost ~]# rpm -qa  |grep dnf
dnf-0.4.10-1.fc20.noarch
[root@localhost ~]# uname -a
Linux localhost.localdomain 3.13.0-0.rc6.git0.2.fc21.x86_64 #1 SMP Tue Dec 31 04:14:44 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
[root@localhost ~]#
Comment 4 Ankur Sinha (FranciscoD) 2014-01-05 06:04:22 EST
Ran into this just now:

[asinha@ankur-laptop  work]$ sudo dnf search "xmlbase"
Warning: No matches found for: xmlbase
Traceback (most recent call last):
  File "/bin/dnf", line 35, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 240, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 63, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 122, in _main
    cli.run()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1456, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/commands.py", line 988, in run
    return self.cli.search(extcmds)
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1521, in search
    raise dnf.exception.Error(_('No Matches found'))
AttributeError: 'module' object has no attribute 'exception'
Comment 5 Ales Kozumplik 2014-01-06 02:05:51 EST
Hey, thanks for the report, I'll take a look.
Comment 6 Ales Kozumplik 2014-01-06 03:12:32 EST
Fixed upstream by ccca105, this will be released in dnf-0.4.11.
Comment 7 Christian Stadelmann 2014-01-07 10:42:10 EST
Another user experienced a similar problem:

Latest version of DNF crashes when searching for something which cannot be found.
E.g. searching for 'rockbox' by typing
$ dnf search rockbox
this is always reproducible for me with any random search string that cannot be found. This is reproducible as default user and as root.

reporter:       libreport-2.1.10
cmdline:        /usr/bin/python /usr/bin/dnf search rockbox
executable:     /usr/bin/dnf
kernel:         3.12.6-300.fc20.x86_64
package:        dnf-0.4.10-1.fc20
reason:         cli.py:1521:search:AttributeError: 'module' object has no attribute 'exception'
runlevel:       N 5
type:           Python
uid:            1000
Comment 8 Fedora Update System 2014-01-09 09:39:35 EST
dnf-0.4.11-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/dnf-0.4.11-1.fc20
Comment 9 lnie 2014-01-10 01:20:55 EST
dnf-0.4.11-1.fc20  works
Comment 10 Fedora Update System 2014-01-10 02:59:50 EST
Package dnf-0.4.11-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-0.4.11-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-0573/dnf-0.4.11-1.fc20
then log in and leave karma (feedback).
Comment 11 Fedora Update System 2014-01-11 03:47:43 EST
dnf-0.4.11-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.