Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1575690 - TypeError: could not get a reference to type class
Summary: TypeError: could not get a reference to type class
Alias: None
Product: Fedora
Classification: Fedora
Component: dnf
Version: 28
Hardware: x86_64
OS: Unspecified
Target Milestone: ---
Assignee: rpm-software-management
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2018-05-07 16:02 UTC by Marcin Juszkiewicz
Modified: 2018-05-14 11:17 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2018-05-14 11:17:02 UTC
Type: Bug

Attachments (Terms of Use)

Description Marcin Juszkiewicz 2018-05-07 16:02:13 UTC
Description of problem:

I am running Fedora 27 and did 'dnf --releasever 28 update dnf' which did not ended well:

[root@gossamer hrw]# dnf update 
Ostatnio sprawdzono ważność metadanych: 0:02:05 temu w dniu pon, 7 maj 2018, 17:54:14.
/usr/lib/python3.6/site-packages/dnf/base.py:220: Warning: cannot retrieve class for invalid (unclassed) type 'void'
  module_defaults_prioritizer = Modulemd.Prioritizer()

Traceback (most recent call last):
  File "/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 115, in cli_run
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 1015, in run
  File "/usr/lib/python3.6/site-packages/dnf/cli/cli.py", line 768, in _process_demands
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 500, in fill_sack
  File "/usr/lib/python3.6/site-packages/dnf/base.py", line 220, in _setup_modules
    module_defaults_prioritizer = Modulemd.Prioritizer()
TypeError: could not get a reference to type class
[root@gossamer hrw]# 

Version-Release number of selected component (if applicable):

[root@gossamer hrw]# LANGUAGE=C dnf --version
  Installed: dnf-0:2.7.5-12.fc28.noarch at pon, 7 maj 2018, 15:54:58
  Built    : Fedora Project at śro, 18 kwi 2018, 14:29:51

  Installed: rpm-0:4.14.1-1.fc27.x86_64 at pon, 12 lut 2018, 08:13:09
  Built    : Fedora Project at czw, 1 lut 2018, 11:45:18

How reproducible:

no idea

Steps to Reproduce:
1. Get fedora 27
2. "dnf --releasever 28 update fedora-release"
3. "dnf update dnf"
4. "dnf update"

Actual results:


Expected results:

just works

Additional info:

I know that it is not the best way to update Fedora. Just surprised that it failed.

Comment 1 Martin Hatina 2018-05-14 08:18:40 UTC
Try updating glib2 via rpm. It should fix the issue.

Comment 2 Marcin Juszkiewicz 2018-05-14 10:52:05 UTC
Thanks a lot Martin!

Upgrading glib2 (i686, x86_64) solved problem. "dnf update" works now.

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