Bug 1475375 - 'dnf module install' crashes with AttributeError: 'NoneType' object has no attribute 'enabled'
'dnf module install' crashes with AttributeError: 'NoneType' object has no at...
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
26
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: rpm-software-management
Fedora Extras Quality Assurance
:
Depends On:
Blocks: dnf-modularity
  Show dependency treegraph
 
Reported: 2017-07-26 10:12 EDT by Kamil Dudka
Modified: 2017-08-04 07:47 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-08-02 04:43:15 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Kamil Dudka 2017-07-26 10:12:03 EDT
Version-Release number of selected component (if applicable):
dnf-2.6.0-3.git.40.c0f7fc6.module_a7788b02.noarch


Steps to Reproduce:
1. docker run --rm -it registry.fedoraproject.org/f26-modular/boltron
2. dnf module install -y nodejs


Actual results:
% docker run --rm -it registry.fedoraproject.org/f26-modular/boltron
bash-4.4# dnf module install -y nodejs
Python detected LC_CTYPE=C: LC_CTYPE & LANG coerced to C.UTF-8 (set another locale or PYTHONCOERCECLOCALE=0 to disable this locale coercion behavior).
Fedora Modular 26 - x86_64                    319 kB/s | 2.0 MB     00:06    
Last metadata expiration check: 0:00:00 ago on Wed Jul 26 14:08:32 2017.
Dependencies resolved.
==============================================================================
 Package          Arch   Version                         Repository      Size
==============================================================================
Installing:
 nodejs           x86_64 1:6.10.3-2.module_9c237b2a      fedora-modular 4.7 M
 npm              x86_64 1:3.10.10-1.6.10.3.2.module_9c237b2a
                                                         fedora-modular 2.5 M
Installing dependencies:
 compat-openssl10 x86_64 1:1.0.2j-6.module_836062be      fedora-modular 1.1 M
 gc               x86_64 7.6.0-5.module_39876f37         fedora-modular 108 k
 guile            x86_64 5:2.0.14-1.module_39876f37      fedora-modular 3.5 M
 libatomic_ops    x86_64 7.4.4-2.module_39876f37         fedora-modular  31 k
 libicu           x86_64 57.1-6.module_836062be          fedora-modular 8.4 M
 libstdc++        x86_64 7.1.1-1.module_39876f37         fedora-modular 456 k
 libtool-ltdl     x86_64 2.4.6-18.module_836062be        fedora-modular  55 k
 libuv            x86_64 1:1.11.0-1.module_836062be      fedora-modular 112 k
 make             x86_64 1:4.2.1-2.module_39876f37       fedora-modular 493 k

Transaction Summary
==============================================================================
Install  11 Packages

Total download size: 21 M
Installed size: 73 M
Downloading Packages:
(1/11): npm-3.10.10-1.6.10.3.2.module_9c237b2 2.4 MB/s | 2.5 MB     00:01    
(2/11): nodejs-6.10.3-2.module_9c237b2a.x86_6 4.1 MB/s | 4.7 MB     00:01    
(3/11): compat-openssl10-1.0.2j-6.module_8360 771 kB/s | 1.1 MB     00:01    
(4/11): libicu-57.1-6.module_836062be.x86_64.  14 MB/s | 8.4 MB     00:00    
(5/11): libstdc++-7.1.1-1.module_39876f37.x86 739 kB/s | 456 kB     00:00    
(6/11): libuv-1.11.0-1.module_836062be.x86_64 281 kB/s | 112 kB     00:00    
(7/11): gc-7.6.0-5.module_39876f37.x86_64.rpm 403 kB/s | 108 kB     00:00    
(8/11): make-4.2.1-2.module_39876f37.x86_64.r 951 kB/s | 493 kB     00:00    
(9/11): guile-2.0.14-1.module_39876f37.x86_64 8.1 MB/s | 3.5 MB     00:00    
(10/11): libatomic_ops-7.4.4-2.module_39876f3  90 kB/s |  31 kB     00:00    
(11/11): libtool-ltdl-2.4.6-18.module_836062b 147 kB/s |  55 kB     00:00    
------------------------------------------------------------------------------
Total                                         8.5 MB/s |  21 MB     00:02     
warning: /var/cache/dnf/fedora-modular-ee159af26e0fc2e5/packages/nodejs-6.10.3-2.module_9c237b2a.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID a3cc4e62: NOKEY
Importing GPG key 0xA3CC4E62:
 Userid     : "Modular Fedora (fedora-modularity) <fedora-modularity@fedoraproject.org>"
 Fingerprint: EC2F 3D1D B70C 6E48 A719 3B5F 5BC1 B527 A3CC 4E62
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-fedora-modularity
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                      1/1 
  Installing       : libstdc++-7.1.1-1.module_39876f37.x86_64            1/11 
  Running scriptlet: libstdc++-7.1.1-1.module_39876f37.x86_64            1/11 
  Installing       : libicu-57.1-6.module_836062be.x86_64                2/11 
  Running scriptlet: libicu-57.1-6.module_836062be.x86_64                2/11 
  Installing       : libtool-ltdl-2.4.6-18.module_836062be.x86_64        3/11 
  Running scriptlet: libtool-ltdl-2.4.6-18.module_836062be.x86_64        3/11 
  Installing       : libatomic_ops-7.4.4-2.module_39876f37.x86_64        4/11 
  Running scriptlet: libatomic_ops-7.4.4-2.module_39876f37.x86_64        4/11 
  Installing       : gc-7.6.0-5.module_39876f37.x86_64                   5/11 
  Running scriptlet: gc-7.6.0-5.module_39876f37.x86_64                   5/11 
  Installing       : guile-5:2.0.14-1.module_39876f37.x86_64             6/11 
  Running scriptlet: guile-5:2.0.14-1.module_39876f37.x86_64             6/11 
  Installing       : make-1:4.2.1-2.module_39876f37.x86_64               7/11 
  Running scriptlet: make-1:4.2.1-2.module_39876f37.x86_64               7/11 
  Installing       : compat-openssl10-1:1.0.2j-6.module_836062be.x86_    8/11 
  Installing       : libuv-1:1.11.0-1.module_836062be.x86_64             9/11 
  Running scriptlet: libuv-1:1.11.0-1.module_836062be.x86_64             9/11 
  Installing       : nodejs-1:6.10.3-2.module_9c237b2a.x86_64           10/11 
  Installing       : npm-1:3.10.10-1.6.10.3.2.module_9c237b2a.x86_64    11/11 
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/dnf/yum/rpmtrans.py", line 433, in callback
    self._instCloseFile(key)
  File "/usr/lib/python3.6/site-packages/dnf/yum/rpmtrans.py", line 514, in _instCloseFile
    display.progress(None, action, None, None, None, None)
  File "/usr/lib/python3.6/site-packages/dnf/modules.py", line 505, in progress
    conf.enabled = True
AttributeError: 'NoneType' object has no attribute 'enabled'

  Running scriptlet: guile-5:2.0.14-1.module_39876f37.x86_64            11/11 
  Verifying        : nodejs-1:6.10.3-2.module_9c237b2a.x86_64            1/11 
  Verifying        : npm-1:3.10.10-1.6.10.3.2.module_9c237b2a.x86_64     2/11 
  Verifying        : compat-openssl10-1:1.0.2j-6.module_836062be.x86_    3/11 
  Verifying        : libicu-57.1-6.module_836062be.x86_64                4/11 
  Verifying        : libstdc++-7.1.1-1.module_39876f37.x86_64            5/11 
  Verifying        : libuv-1:1.11.0-1.module_836062be.x86_64             6/11 
  Verifying        : make-1:4.2.1-2.module_39876f37.x86_64               7/11 
  Verifying        : gc-7.6.0-5.module_39876f37.x86_64                   8/11 
  Verifying        : guile-5:2.0.14-1.module_39876f37.x86_64             9/11 
  Verifying        : libatomic_ops-7.4.4-2.module_39876f37.x86_64       10/11 
  Verifying        : libtool-ltdl-2.4.6-18.module_836062be.x86_64       11/11 

Installed:
  nodejs.x86_64 1:6.10.3-2.module_9c237b2a                                    
  npm.x86_64 1:3.10.10-1.6.10.3.2.module_9c237b2a                             
  compat-openssl10.x86_64 1:1.0.2j-6.module_836062be                          
  gc.x86_64 7.6.0-5.module_39876f37                                           
  guile.x86_64 5:2.0.14-1.module_39876f37                                     
  libatomic_ops.x86_64 7.4.4-2.module_39876f37                                
  libicu.x86_64 57.1-6.module_836062be                                        
  libstdc++.x86_64 7.1.1-1.module_39876f37                                    
  libtool-ltdl.x86_64 2.4.6-18.module_836062be                                
  libuv.x86_64 1:1.11.0-1.module_836062be                                     
  make.x86_64 1:4.2.1-2.module_39876f37                                       

Complete!


Additional info:
bash-4.4# dnf module install -y nodejs-8
Python detected LC_CTYPE=C: LC_CTYPE & LANG coerced to C.UTF-8 (set another locale or PYTHONCOERCECLOCALE=0 to disable this locale coercion behavior).
Last metadata expiration check: 0:00:20 ago on Wed Jul 26 14:08:32 2017.
Dependencies resolved.
==============================================================================
 Package  Arch     Version                             Repository        Size
==============================================================================
Upgrading:
 nodejs   x86_64   1:8.0.0-1.module_42d8f2a0           fedora-modular   5.8 M
 npm      x86_64   1:5.0.0-1.8.0.0.1.module_42d8f2a0   fedora-modular   3.4 M

Transaction Summary
==============================================================================
Upgrade  2 Packages

Total download size: 9.2 M
Downloading Packages:
(1/2): npm-5.0.0-1.8.0.0.1.module_42d8f2a0.x8 3.1 MB/s | 3.4 MB     00:01    
(2/2): nodejs-8.0.0-1.module_42d8f2a0.x86_64. 4.8 MB/s | 5.8 MB     00:01    
------------------------------------------------------------------------------
Total                                         7.6 MB/s | 9.2 MB     00:01     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                      1/1 
  Upgrading        : nodejs-1:8.0.0-1.module_42d8f2a0.x86_64              1/4 
  Upgrading        : npm-1:5.0.0-1.8.0.0.1.module_42d8f2a0.x86_64         2/4 
  Cleanup          : npm-1:3.10.10-1.6.10.3.2.module_9c237b2a.x86_64      3/4 
  Cleanup          : nodejs-1:6.10.3-2.module_9c237b2a.x86_64             4/4 
  Verifying        : npm-1:5.0.0-1.8.0.0.1.module_42d8f2a0.x86_64         1/4 
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
Traceback (most recent call last):
  File "/usr/bin/dnf", line 58, in <module>
    main.user_main(sys.argv[1:], exit_code=True)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 179, in user_main
    errcode = main(args)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 64, in main
    return _main(base, args, cli_class, option_parser_class)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 99, in _main
    return cli_run(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 123, in cli_run
    ret = resolving(cli, base)
  File "/usr/lib/python3.6/site-packages/dnf/cli/main.py", line 154, in resolving
    base.do_transaction(display=displays)
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 237, in do_transaction
    super(BaseCli, self).do_transaction(display)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 739, in do_transaction
    self._run_transaction(cb=cb)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 879, in _run_transaction
    self._verify_transaction(cb.verify_tsi_package)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 931, in _verify_transaction
    count = display_banner(rpo, count)
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 905, in display_banner
    verify_pkg_cb(pkg, count, total)
  File "/usr/lib/python3.6/site-packages/dnf/yum/rpmtrans.py", line 626, in verify_tsi_package
    display.verify_tsi_package(pkg, count, total)
  File "/usr/lib/python3.6/site-packages/dnf/yum/rpmtrans.py", line 108, in verify_tsi_package
    self.progress(pkg, self.PKG_VERIFY, 100, 100, count, total)
  File "/usr/lib/python3.6/site-packages/dnf/modules.py", line 505, in progress
    conf.enabled = True
AttributeError: 'NoneType' object has no attribute 'enabled'
Comment 1 Martin Hatina 2017-08-02 04:43:15 EDT
I know about this problem, it is already fixed in https://copr.fedorainfracloud.org/coprs/mhatina/DNF-Modules/build/585687/
Comment 2 Martin Hatina 2017-08-02 07:22:08 EDT
To make it clear this fix won't be in Boltron. For now, fixes for modular part of dnf will be only in https://copr.fedorainfracloud.org/coprs/mhatina/DNF-Modules

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