Ask Your Question

fedora26 dnf python3

asked 2017-08-09 23:50:47 -0500

osulluke gravatar image

Hi everyone, I've upgraded to Fedora 26, and now my dnf is not working because I think something has gone wrong with python3. When I run 'sudo dnf update', I get the following:

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/", line 179, in user_main

errcode = main(args)

File "/usr/lib/python3.6/site-packages/dnf/cli/", line 64, in main

return _main(base, args, cli_class, option_parser_class)

File "/usr/lib/python3.6/site-packages/dnf/cli/", line 99, in _main

return cli_run(cli, base)

File "/usr/lib/python3.6/site-packages/dnf/cli/", line 115, in cli_run

File "/usr/lib/python3.6/site-packages/dnf/cli/", line 1028, in run


File "/usr/lib/python3.6/site-packages/dnf/cli/", line 788, in processdemands


File "/usr/lib/python3.6/site-packages/dnf/", line 316, in fill_sack


File "/usr/lib/python3.6/site-packages/dnf/", line 118, in addrepotosack

hrepo.filelists_fn = repo._filelists_fn

TypeError: Expected a string or a unicode object

I've thought about reinstalling python3, but seem to be in a bit of a Catch-22 since 'dnf' isn't working...any ideas?



edit retag flag offensive close merge delete


Notice that dnf is using the "system-python-3.6.2-1.fc26.i686" version of python and not the normal python3 package.

villykruse gravatar imagevillykruse ( 2017-08-10 03:50:20 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-10-16 22:35:45 -0500

II'm Getting the same error messages as the original post with Fedora 25.

The only difference being that the path in the error messages states 3.5 (edited for clarity)

edit flag offensive delete link more


I just fixed my issue.

Yours may be quite different.

In my case I had recently attempted to install an OpenProject CentOS7 repo on Fedora 25.

The OpenProject instructions said to run

sudo wget -O /etc/yum.repos.d/openproject-ce.repo \

More info here:

Upon sudo rm'ing the openproject repo from my /etc/yum.repos.d/ folder dnf worked immediately.

If you've added any repos recently start there. If not, keep digging.

sourceofentropy gravatar imagesourceofentropy ( 2017-10-16 22:44:25 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2017-08-09 23:49:02 -0500

Seen: 340 times

Last updated: Oct 16 '17