dnf-1.1.6-1 # LC_ALL=ru_RU dnf clean metadata Сброс источников: fedora google-chrome russianfedora-free russianfedora-nonfree russianfedora-free-updates : russianfedora-nonfree-updates updates Traceback (most recent call last): File "/usr/bin/dnf", line 57, in <module> main.user_main(sys.argv[1:], exit_code=True) File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 174, in user_main errcode = main(args) File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 60, in main return _main(base, args) File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 112, in _main cli.run() File "/usr/lib/python3.4/site-packages/dnf/cli/cli.py", line 1095, in run return self.command.run(self.base.extcmds) File "/usr/lib/python3.4/site-packages/dnf/cli/commands/clean.py", line 230, in run return self.clean(extcmds) File "/usr/lib/python3.4/site-packages/dnf/cli/commands/clean.py", line 200, in clean xmlcode, xmlresults = _clean_metadata(repos) File "/usr/lib/python3.4/site-packages/dnf/cli/commands/clean.py", line 107, in _clean_metadata return _clean_files(repos, exts, 'cachedir', 'metadata') File "/usr/lib/python3.4/site-packages/dnf/cli/commands/clean.py", line 98, in _clean_files return _clean_filelist(filetype, filelist) File "/usr/lib/python3.4/site-packages/dnf/cli/commands/clean.py", line 85, in _clean_filelist msg %= (removed, filetype) TypeError: not all arguments converted during string formatting Running with LC_ALL=C works fine. I'm pretty sure that's a translation problem. Looking at https://github.com/rpm-software-management/dnf/blob/master/po/ru.po#L1484 it clearly misses third plural form (well, actually second is horribly wrong too).
Thanks for the report. You can make better translations at https://fedora.zanata.org/project/view/dnf ;)
*** Bug 1303447 has been marked as a duplicate of this bug. ***
Another user experienced a similar problem: Try execute 'sudo dnf clean packages' or 'sudo dnf clean all'. reporter: libreport-2.6.3 cmdline: /usr/bin/python3 /bin/dnf clean packages executable: /bin/dnf kernel: 4.3.4-300.fc23.x86_64 package: dnf-1.1.6-1.fc23 reason: clean.py:85:_clean_filelist:TypeError: not all arguments converted during string formatting runlevel: N 5 type: Python3 uid: 0
in case of locale ru_UA.UTF-8 dnf is affected too Traceback (most recent call last): File "/usr/bin/dnf", line 57, in <module> main.user_main(sys.argv[1:], exit_code=True) File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 174, in user_main errcode = main(args) File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 60, in main return _main(base, args) File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 112, in _main cli.run() File "/usr/lib/python3.4/site-packages/dnf/cli/cli.py", line 1095, in run return self.command.run(self.base.extcmds) File "/usr/lib/python3.4/site-packages/dnf/cli/commands/clean.py", line 230, in run return self.clean(extcmds) File "/usr/lib/python3.4/site-packages/dnf/cli/commands/clean.py", line 184, in clean pkgcode, pkgresults = _clean_packages(repos) File "/usr/lib/python3.4/site-packages/dnf/cli/commands/clean.py", line 114, in _clean_packages return _clean_files(repos, exts, 'pkgdir', 'package') File "/usr/lib/python3.4/site-packages/dnf/cli/commands/clean.py", line 98, in _clean_files return _clean_filelist(filetype, filelist) File "/usr/lib/python3.4/site-packages/dnf/cli/commands/clean.py", line 85, in _clean_filelist msg %= (removed, filetype) TypeError: not all arguments converted during string formatting
[root@WS143 maxim.prohorenko]# dnf update -y Проверка истечения последних метаданных произведена 2:21:53 назад на Fri Feb 19 12:42:17 2016. Зависимости разрешены. Отсутствуют действия для выполнения Выполнено! [root@WS143 maxim.prohorenko]# dnf clean all Сброс источников: rpmfusion-nonfree-updates rpmfusion-free google-chrome rpmfusion-free-22 russianfedora-branding-updates russianfedora-fixes rpmfusion-nonfree-updates-testing fedora rpmfusion-free-updates-22 : updates rpmfusion-nonfree-22 rpmfusion-free-updates russianfedora-free-updates rpmfusion-free-updates-testing russianfedora-free rpmfusion-nonfree russianfedora-fixes-updates : russianfedora-nonfree-updates rpmfusion-nonfree-updates-22 russianfedora-nonfree russianfedora-branding Очистка всего Traceback (most recent call last): File "/bin/dnf", line 57, in <module> main.user_main(sys.argv[1:], exit_code=True) File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 174, in user_main errcode = main(args) File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 60, in main return _main(base, args) File "/usr/lib/python3.4/site-packages/dnf/cli/main.py", line 112, in _main cli.run() File "/usr/lib/python3.4/site-packages/dnf/cli/cli.py", line 1095, in run return self.command.run(self.base.extcmds) File "/usr/lib/python3.4/site-packages/dnf/cli/commands/clean.py", line 230, in run return self.clean(extcmds) File "/usr/lib/python3.4/site-packages/dnf/cli/commands/clean.py", line 184, in clean pkgcode, pkgresults = _clean_packages(repos) File "/usr/lib/python3.4/site-packages/dnf/cli/commands/clean.py", line 114, in _clean_packages return _clean_files(repos, exts, 'pkgdir', 'package') File "/usr/lib/python3.4/site-packages/dnf/cli/commands/clean.py", line 98, in _clean_files return _clean_filelist(filetype, filelist) File "/usr/lib/python3.4/site-packages/dnf/cli/commands/clean.py", line 85, in _clean_filelist msg %= (removed, filetype) TypeError: not all arguments converted during string formatting [root@WS143 maxim.prohorenko]# dnf remove python3-dnf-1.1.6-2.fc23.noarch Зависимости разрешены. Ошибка: The operation would result in removing the following protected packages: dnf. [root@WS143 maxim.prohorenko]# uname -a Linux WS143.local.rfdyn.ru 4.3.5-300.fc23.x86_64 #1 SMP Mon Feb 1 03:18:41 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux [root@WS143 maxim.prohorenko]# [root@WS143 maxim.prohorenko]# LANG=C dnf clean all Cleaning repos: rpmfusion-nonfree-updates-22 updates russianfedora-free-updates russianfedora-nonfree-updates rpmfusion-nonfree-updates-testing russianfedora-nonfree rpmfusion-free google-chrome : rpmfusion-free-updates-22 rpmfusion-free-updates rpmfusion-free-22 russianfedora-branding fedora rpmfusion-nonfree-22 russianfedora-free rpmfusion-nonfree rpmfusion-free-updates-testing : rpmfusion-nonfree-updates russianfedora-fixes-updates russianfedora-branding-updates russianfedora-fixes Cleaning up Everything
I can confirm this bug and was able to reproduce. It doesn't look like it's missing 3rd plural, but it is still doesn't work.
*** Bug 1316886 has been marked as a duplicate of this bug. ***
*** Bug 1334746 has been marked as a duplicate of this bug. ***
This package has changed ownership in the Fedora Package Database. Reassigning to the new owner of this component.
Works for me. Should be fixed in dnf-1.1.9 (Take a look at this commit https://github.com/rpm-software-management/dnf/commit/93159e360f0b6150e598bba783e22ca113201a40) In case reopen this bug and provide more info. Thanks
(In reply to Štěpán Smetana from comment #10) > Works for me. > Should be fixed in dnf-1.1.9 (Take a look at this commit > https://github.com/rpm-software-management/dnf/commit/ > 93159e360f0b6150e598bba783e22ca113201a40) > In case reopen this bug and provide more info. > Thanks rpm gpg-signing has nothing to do with this bug.
I could reproduce it only on virtual Fedora 22 with dnf-1.1.6-2 1. dnf update 2. dnf clean metadata @Igor Please provide some steps to reproduce or close this bug. I could not reproduce it with new version of dnf.
This message is a reminder that Fedora 23 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 23. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as EOL if it remains open with a Fedora 'version' of '23'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 23 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete.
Has been fixed during dnf 2.0 development. dnf-2.0.0-0.rc1.4.fc26.noarch # LC_ALL=ru_RU dnf clean metadata Failed to set locale, defaulting to C 42 files removed Feel free to reopen if you disagree.
Clearing needinfo.
>Failed to set locale, defaulting to C Seriously? You do understand, that you *do* need ru_RU locale to reproduce. It's *always* worked with C locale (and setting locale to C was used as a workaround)
Oops, my fault. After installation glibc-langpack-ru result is # LC_ALL=ru_RU dnf clean metadatary 37 ������ ������� which seems to work (except I have not correct terminal font) but it still fails for LC_ALL=ru dnf clean metadata Failed to set locale, defaulting to C 0 \u0444\u0430\u0439\u043b\u043e\u0432 \u0443\u0434\u0430\u043b\u0435\u043d\u043e --- Logging error --- Traceback (most recent call last): File "/usr/lib64/python3.5/logging/__init__.py", line 982, in emit stream.write(msg) UnicodeEncodeError: 'ascii' codec can't encode characters in position 23-28: ordinal not in range(128) Call stack: File "/usr/bin/dnf", line 58, in <module> main.user_main(sys.argv[1:], exit_code=True) File "/usr/lib/python3.5/site-packages/dnf/cli/main.py", line 175, in user_main errcode = main(args) File "/usr/lib/python3.5/site-packages/dnf/cli/main.py", line 61, in main return _main(base, args) File "/usr/lib/python3.5/site-packages/dnf/cli/main.py", line 99, in _main return cli_run(cli, base) File "/usr/lib/python3.5/site-packages/dnf/cli/main.py", line 115, in cli_run cli.run() File "/usr/lib/python3.5/site-packages/dnf/cli/cli.py", line 954, in run return self.command.run() File "/usr/lib/python3.5/site-packages/dnf/cli/commands/clean.py", line 105, in run logger.info(P_('%d file removed', '%d files removed', count) % count) Message: '0 \u0444\u0430\u0439\u043b\u043e\u0432 \u0443\u0434\u0430\u043b\u0435\u043d\u043e' Arguments: () dnf-2.0.0-0.rc1.4.fc26.noarch
I think second error is something different. There's no such thing as ru locale (well, it's "parent" pseudo-locale), so it defaults to C, which is right. And the error is right too. Yet, somehow it still tries to use ru translation (most of the translations are in "ru" pseudo-locale, not in ru_RU). I'm pretty sure it will fail with LC_ALL=hu or LC_ALL=es So, yeah, this bug is definitely fixed. But another one emerged, heh.
But dnf-2 works: $ LC_ALL=ru dnf-2 clean all bash: warning: setlocale: LC_ALL: cannot change locale (ru): No such file or directory Failed to set locale, defaulting to C Repository 'fedora' is missing name in configuration, using id. 0 файлов удалено
This bug is planned to be fixed within next 1-2 months.
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle. Changing version to '26'.
This pull request fix the crash https://github.com/rpm-software-management/dnf/pull/751. But another problem is with encoding of printed messages. Althought we get message "...defaulting to C", message is translated (eg. to russian if "ru" is used) and unicode characters is translated to escape sequences. That is because logger does not known the encoding of terminal (nonexistent locale "ru") and recodes all characters to ASCII.
This pull request fix the crash https://github.com/rpm-software-management/dnf/pull/751. But another problem is with encoding of printed messages. Althought we get message "...defaulting to C", message is translated (eg. to russian if "ru" is used) and unicode characters are translated to escape sequences. That is because logger does not known the encoding of terminal (nonexistent locale "ru") and recodes all characters to ASCII. BTW: Is encoding problem of dnf? Use the "locale -a" to obtain the names of the available locales. Is "ru" locale available on your system? Not. Why you want use unavailable locale?
It is fixed in version dnf-2.1.1-1.1.fc26. Dnf uses the original (not translated) English messages if the locale is not available on system.
*** Bug 1286559 has been marked as a duplicate of this bug. ***