Bug 1130559 - [abrt] dnf: copr.py:74:run:AttributeError: 'Cli' object has no attribute 'logger'
Summary: [abrt] dnf: copr.py:74:run:AttributeError: 'Cli' object has no attribute 'log...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 21
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Parag Nemade
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:cf42e2a89e6cb07040b04185110...
: 1130727 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-15 14:23 UTC by Lukas Slebodnik
Modified: 2014-08-18 07:54 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-18 07:54:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (931 bytes, text/plain)
2014-08-15 14:23 UTC, Lukas Slebodnik
no flags Details
File: environ (2.32 KB, text/plain)
2014-08-15 14:23 UTC, Lukas Slebodnik
no flags Details

Description Lukas Slebodnik 2014-08-15 14:23:09 UTC
Description of problem:
After upgrade from fedora 20 to fedora 21, I called "dnf copr list"

Version-Release number of selected component:
dnf-0.6.0-1.fc21

Additional info:
reporter:       libreport-2.2.3
cmdline:        /usr/bin/python -OO /bin/dnf copr list
dso_list:       dnf-plugins-core-0.1.2-1.fc21.noarch
executable:     /bin/dnf
kernel:         3.16.0-1.fc21.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
copr.py:74:run:AttributeError: 'Cli' object has no attribute 'logger'

Traceback (most recent call last):
  File "/bin/dnf", line 36, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 182, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 134, in _main
    cli.run()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1072, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf-plugins/copr.py", line 74, in run
    self.cli.logger.critical(
AttributeError: 'Cli' object has no attribute 'logger'

Local variables in innermost frame:
self: <dnf.plugin.dynamic.copr.CoprCommand object at 0x7f13aebf2710>
subcommand: u'list'
extcmds: [u'list']

Comment 1 Lukas Slebodnik 2014-08-15 14:23:13 UTC
Created attachment 927134 [details]
File: backtrace

Comment 2 Lukas Slebodnik 2014-08-15 14:23:14 UTC
Created attachment 927135 [details]
File: environ

Comment 3 José Matos 2014-08-15 17:24:15 UTC
It happened to me the same when updating Fedora 21 to dnf-0.6.0-1.fc21.noarch

I upgraded this machine to Fedora 21  more than two weeks ago and I have been upgrading the system since with no problems until today.

Comment 4 Lukas Slebodnik 2014-08-15 17:43:14 UTC
I think the problem is incompatibility between packages dnf and dnf-plugins-core.
The similar error is printed after executing commands:
 dnf copr
 dnf debuginfo-install
 dnf playground

sh-4.3$ rpm -qa "dnf*"
dnf-0.6.0-1.fc21.noarch
dnf-plugins-core-0.1.2-1.fc21.noarch

Comment 5 Parag Nemade 2014-08-17 01:56:40 UTC
submitted upstream a merge request https://github.com/akozumpl/dnf-plugins-core/pull/37 which should fix this bug.

Comment 6 Parag Nemade 2014-08-17 10:09:21 UTC
*** Bug 1130727 has been marked as a duplicate of this bug. ***

Comment 7 Lukas Slebodnik 2014-08-18 05:26:31 UTC
(In reply to Parag from comment #5)
> submitted upstream a merge request
> https://github.com/akozumpl/dnf-plugins-core/pull/37 which should fix this
> bug.

pull request does not solve problem with playground plugin.
Could you fix this plugin as well?

Comment 8 Parag Nemade 2014-08-18 05:29:06 UTC
Do you get the same abrt message? I think I fixed playground plugin also which is written in copr.py

Comment 9 Lukas Slebodnik 2014-08-18 05:45:28 UTC
In your pull request, I can see changes only in files plugins/copr.py and plugins/debuginfo-install.py.

[root@host ~]# dnf playground
Traceback (most recent call last):
  File "/bin/dnf", line 36, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 182, in user_main
    errcode = main(args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 84, in main
    return _main(base, args)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 134, in _main
    cli.run()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1072, in run
    return self.command.run(self.base.extcmds)
  File "/usr/lib/python2.7/site-packages/dnf-plugins/copr.py", line 306, in run
    self.cli.logger.critical(
AttributeError: 'Cli' object has no attribute 'logger'

Comment 10 Parag Nemade 2014-08-18 05:49:55 UTC
hmm. When I applied the pull request changes locally in dnf-plugins/ directory, I see plugins are working fine. see
$ dnf playground
Error: exactly one parameter to playground command are required
 Mini usage:

playground  [enable|disable|upgrade]

Interact with Playground repository.
Error: exactly one parameter to playground command are required

Comment 11 Lukas Slebodnik 2014-08-18 05:54:51 UTC
You are right. I didn't noticed last line in dnf playground stack trace. It is in file /usr/lib/python2.7/site-packages/dnf-plugins/copr.py

Comment 12 Parag Nemade 2014-08-18 07:54:11 UTC
Thanks Ales! The merge request is accepted in upstream now. Closing this as upstream.


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