Bug 1130878 - [abrt] dnf: persistor.py:60:_diff_dcts:AttributeError: 'NoneType' object has no attribute 'keys'
[abrt] dnf: persistor.py:60:_diff_dcts:AttributeError: 'NoneType' object has ...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
21
x86_64 Linux
unspecified Severity urgent
: ---
: ---
Assigned To: Ales Kozumplik
Fedora Extras Quality Assurance
https://retrace.fedoraproject.org/faf...
abrt_hash:99afb3b4afb0ef8851fcf9eeae7...
:
: 1134572 1145820 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-18 02:16 EDT by Parag Nemade
Modified: 2014-09-30 19:42 EDT (History)
14 users (show)

See Also:
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 12:53:06 EDT
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 02:16 EDT, Parag Nemade
no flags Details
File: environ (1.78 KB, text/plain)
2014-08-18 02:16 EDT, Parag Nemade
no flags Details

  None (edit)
Description Parag Nemade 2014-08-18 02:16:32 EDT
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 02:16:36 EDT
Created attachment 927655 [details]
File: backtrace
Comment 2 Parag Nemade 2014-08-18 02:16:38 EDT
Created attachment 927656 [details]
File: environ
Comment 3 Parag Nemade 2014-08-18 02:20:15 EDT
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 08:40:38 EDT
Hi, thanks for the report. We'll take a look.
Comment 5 Ankur Sinha (FranciscoD) 2014-08-23 21:47:07 EDT
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 05:44:03 EDT
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 09:10:05 EDT
Reproduced.
Comment 8 Ales Kozumplik 2014-08-25 09:36:02 EDT
Fixed by 031f95b on master.
Comment 9 Ankur Sinha (FranciscoD) 2014-08-25 10:04:08 EDT
Thaks Ales. I'll confirm it when the fix hits the nightly repo.
Comment 10 Ales Kozumplik 2014-08-28 01:48:12 EDT
*** Bug 1134572 has been marked as a duplicate of this bug. ***
Comment 11 Ankur Sinha (FranciscoD) 2014-08-28 12:53:06 EDT
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 11:49:34 EDT
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 00:40:19 EDT
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 19:43:49 EDT
*** 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.