On 09/30/2015 10:11 PM, Sergio Belkin wrote:
Hi,
Everytime that I use dnf it outputs this message:
````
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 198, 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 117, in _main
cli.configure(map(ucd, args))
File "/usr/lib/python2.7/site-packages/dnf/cli/cli.py", line 1007, in
configure
self.optparser.usage = self.optparser.get_usage()
File "/usr/lib/python2.7/site-packages/dnf/cli/option_parser.py", line 273,
in get_usage
usage += "%-25s %s\n" % (name, summary)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 40:
ordinal not in range(128)
````
I use `alias dnf='LANG=C dnf'` as a work around. Anyway I'd want to know if
I'm doing something wrong or it's a bug.
A quick google search indicates it is a bug in python's UTF8 support and that it has
been reported. The current workaround is the same as you've discovered.
Thanks in advance.
Information about my system:
# uname -r
4.1.7-200.fc22.x86_64
# rpm -q dnf
dnf-1.1.1-2.fc22.noarch
# locale
LANG=es_AR.UTF-8
LC_CTYPE="es_AR.UTF-8"
LC_NUMERIC="es_AR.UTF-8"
LC_TIME="es_AR.UTF-8"
LC_COLLATE="es_AR.UTF-8"
LC_MONETARY="es_AR.UTF-8"
LC_MESSAGES="es_AR.UTF-8"
LC_PAPER="es_AR.UTF-8"
LC_NAME="es_AR.UTF-8"
LC_ADDRESS="es_AR.UTF-8"
LC_TELEPHONE="es_AR.UTF-8"
LC_MEASUREMENT="es_AR.UTF-8"
LC_IDENTIFICATION="es_AR.UTF-8"
LC_ALL=
# cat /etc/redhat-release
Fedora release 22 (Twenty Two)
Thanks in advance!
--
--
Sergio Belkin
LPIC-2 Certified -
http://www.lpi.org
--
In reality, some people should stick to running Windows and others should stay away from
computers altogether.