Bug 1130878 - [abrt] dnf: persistor.py:60:_diff_dcts:AttributeError: 'NoneType' object has no attribute 'keys'
Summary: [abrt] dnf: persistor.py:60:_diff_dcts:AttributeError: 'NoneType' object has ...
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf   
(Show other bugs)
Version: 21
Hardware: x86_64
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: Ales Kozumplik
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:99afb3b4afb0ef8851fcf9eeae7...
Keywords:
: 1134572 1145820 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-08-18 06:16 UTC by Parag Nemade
Modified: 2014-09-30 23:42 UTC (History)
14 users (show)

Fixed In Version: dnf-0.6.1-1.fc21
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-28 16:53:06 UTC
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.42 KB, text/plain)
2014-08-18 06:16 UTC, Parag Nemade
no flags Details
File: environ (1.78 KB, text/plain)
2014-08-18 06:16 UTC, Parag Nemade
no flags Details

Description Parag Nemade 2014-08-18 06:16:32 UTC
Description of problem:
Installed fresh Fedora 21 virtual machine. 
Tried to install packages using  'dnf groupinstall "GNOME Desktop"' command.
abrt occurred.

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 groupinstall 'GNOME Desktop'
executable:     /bin/dnf
kernel:         3.16.1-300.fc21.x86_64
runlevel:       3 5
type:           Python
uid:            0

Truncated backtrace:
persistor.py:60:_diff_dcts:AttributeError: 'NoneType' object has no attribute 'keys'

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 141, in _main
    ret = resolving(cli, base)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 160, in resolving
    base.do_transaction()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 185, in do_transaction
    grp_diff = self._groups_diff()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 145, in _groups_diff
    return self.group_persistor.diff()
  File "/usr/lib/python2.7/site-packages/dnf/persistor.py", line 273, in diff
    return _GroupsDiff(self._original, self.db)
  File "/usr/lib/python2.7/site-packages/dnf/persistor.py", line 170, in __init__
    self.added, self.removed = _diff_dcts(db_old, db_new)
  File "/usr/lib/python2.7/site-packages/dnf/persistor.py", line 60, in _diff_dcts
    keys1 = set(dct1.keys())
AttributeError: 'NoneType' object has no attribute 'keys'

Local variables in innermost frame:
dct1: None
removed: {}
dct2: <dnf.persistor.ClonableDict object at 0x7fd9faf1c090>
added: {}

Comment 1 Parag Nemade 2014-08-18 06:16:36 UTC
Created attachment 927655 [details]
File: backtrace

Comment 2 Parag Nemade 2014-08-18 06:16:38 UTC
Created attachment 927656 [details]
File: environ

Comment 3 Parag Nemade 2014-08-18 06:20:15 UTC
Looks like I was not using above command as root user and also not having dnf-plugins-core installed when this abrt happened.

Comment 4 Honza Silhan 2014-08-18 12:40:38 UTC
Hi, thanks for the report. We'll take a look.

Comment 5 Ankur Sinha (FranciscoD) 2014-08-24 01:47:07 UTC
Just ran into this:

[asinha@localhost  ~]$ sudo dnf install @java
Dependencies resolved.
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 141, in _main
    ret = resolving(cli, base)
  File "/usr/lib/python2.7/site-packages/dnf/cli/main.py", line 160, in resolving
    base.do_transaction()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 185, in do_transaction
    grp_diff = self._groups_diff()
  File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 145, in _groups_diff
    return self.group_persistor.diff()
  File "/usr/lib/python2.7/site-packages/dnf/persistor.py", line 273, in diff
    return _GroupsDiff(self._original, self.db)
  File "/usr/lib/python2.7/site-packages/dnf/persistor.py", line 170, in __init__
    self.added, self.removed = _diff_dcts(db_old, db_new)
  File "/usr/lib/python2.7/site-packages/dnf/persistor.py", line 60, in _diff_dcts
    keys1 = set(dct1.keys())
AttributeError: 'NoneType' object has no attribute 'keys'

[asinha@localhost  ~]$ dnf --version
0.6.0
  Installed: dnf-0:0.6.0-99.1121.20140822gita896404.fc21.noarch at 2014-08-24 01:44
  Built    :  at 2014-08-22 12:44

  Installed: rpm-0:4.12.0-0.beta1.5.fc21.x86_64 at 2014-08-22 16:43
  Built    : Fedora Project at 2014-08-20 12:30
[asinha@localhost  ~]$ 


Seems like one can't install groups using dnf at the moment. Updating severity.

Comment 6 Matteo Settenvini 2014-08-24 09:44:03 UTC
Another user experienced a similar problem:

Trying to install a group. By the way, note how "dnf group list" shows localized group names, but "dnf group install <group>" wants English names!

reporter:       libreport-2.2.3
cmdline:        /usr/bin/python -OO /usr/bin/dnf group install 'GNOME Desktop Environment'
executable:     /usr/bin/dnf
kernel:         3.16.1-300.fc21.x86_64
package:        dnf-0.6.0-1.fc21
reason:         persistor.py:60:_diff_dcts:AttributeError: 'NoneType' object has no attribute 'keys'
runlevel:       N 5
type:           Python
uid:            0

Comment 7 Ales Kozumplik 2014-08-25 13:10:05 UTC
Reproduced.

Comment 8 Ales Kozumplik 2014-08-25 13:36:02 UTC
Fixed by 031f95b on master.

Comment 9 Ankur Sinha (FranciscoD) 2014-08-25 14:04:08 UTC
Thaks Ales. I'll confirm it when the fix hits the nightly repo.

Comment 10 Ales Kozumplik 2014-08-28 05:48:12 UTC
*** Bug 1134572 has been marked as a duplicate of this bug. ***

Comment 11 Ankur Sinha (FranciscoD) 2014-08-28 16:53:06 UTC
Seems fixed. I get a list of packages in the group, and then it tries to install whatever isn't installed yet. 

dnf-0.6.1-99.1134.20140828git883a271.fc21.noarch

Thanks. 
Warm regards,
Ankur

Comment 12 Fedora Update System 2014-09-04 15:49:34 UTC
dnf-0.6.1-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/dnf-0.6.1-1.fc21

Comment 13 Fedora Update System 2014-09-23 04:40:19 UTC
dnf-0.6.1-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Parag Nemade 2014-09-23 23:43:49 UTC
*** Bug 1145820 has been marked as a duplicate of this bug. ***


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