Version-Release number of selected component: hplip-gui-3.13.6-2.fc19 Additional info: reporter: libreport-2.1.5 cmdline: /usr/bin/python /usr/bin/hp-toolbox dso_list: hplip-3.13.6-2.fc19.x86_64 executable: /usr/bin/hp-toolbox kernel: 3.9.9-301.fc19.x86_64 runlevel: N 5 uid: 1000 Truncated backtrace: utils.py:466:commafy:UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3: ordinal not in range(128) Traceback (most recent call last): File "/usr/share/hplip/ui4/firmwaredialog.py", line 96, in downloadFirmware ok = d.downloadFirmware() File "/usr/share/hplip/base/device.py", line 2697, in downloadFirmware log.debug("%s bytes downloaded." % utils.commafy(bytes_written)) File "/usr/share/hplip/base/utils.py", line 466, in commafy return unicode(locale.format("%d", val, grouping=True)) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3: ordinal not in range(128) Local variables in innermost frame: val: 222443
Created attachment 772958 [details] File: backtrace
Created attachment 772959 [details] File: core_backtrace
Created attachment 772960 [details] File: environ
No idea what went wrong, the following command works for me with Russian locale: python -c 'import locale; print unicode(locale.format("%d", 222443, grouping=True))'
*** Bug 919792 has been marked as a duplicate of this bug. ***
Are you able to reproduce this problem, or did it only happen once?
I'm seeing this with 3.13.11-4 on F-20. Happens after entering root username/password when clicking "add printer" in the dialog that follows downloading the proprietary plugin. This is with hp-setup launched from the console when setting up a LaserJet 1000 series printer. Language = US English, formats setting = Finnish. Traceback (most recent call last): File "/usr/share/hplip/ui4/setupdialog.py", line 1251, in NextButton_clicked self.addPrinter() File "/usr/share/hplip/ui4/setupdialog.py", line 954, in addPrinter self.flashFirmware() File "/usr/share/hplip/ui4/setupdialog.py", line 972, in flashFirmware if d.downloadFirmware(): File "/usr/share/hplip/base/device.py", line 2720, in downloadFirmware log.debug("%s bytes downloaded." % utils.commafy(bytes_written)) File "/usr/share/hplip/base/utils.py", line 466, in commafy return locale.format("%d", val, grouping=True).decode(locale.getpreferredencoding()) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 3: ordinal not in range(128)
Oh, I see. 0xc2 is the first byte of a non-breaking space (or something similar) used for digit grouping in Finnish. The problem comes about because of a mismatch of encodings: LANG=C python << "EOF" import locale locale.setlocale(locale.LC_ALL, "fi_FI.UTF-8") locale.format("%d", 1000, grouping=True).decode(locale.getpreferredencoding()) EOF Here, getpreferredencoding() is thinking about locale "C", but locale.format() is thinking about "fi_FI.UTF-8". My guess is that changing locale.getpreferredencoding() to locale.getlocale(locale.LC_NUMERIC)[1] will fix it. I've checked that fix in on master.
Thanks, I'll try to remember to try out the fix when I have access to the machine again (which might take a while).
The change in master is broken: $ python >>> import locale >>> locale.getlocale(locale.LC_NUMERIC()[1]) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'int' object is not callable Comment 10 seems to have the correct syntax, locale.getlocale(locale.LC_NUMERIC)[1]
Oops, sorry, fix coming up.
*** Bug 1128895 has been marked as a duplicate of this bug. ***
This message is a notice that Fedora 19 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 19. It is Fedora's policy to close all bug reports from releases that are no longer maintained. Approximately 4 (four) weeks from now this bug will be closed as EOL if it remains open with a Fedora 'version' of '19'. 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 19 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.
https://admin.fedoraproject.org/updates/FEDORA-2014-15818/hplip-3.14.10-3.fc20 https://admin.fedoraproject.org/updates/FEDORA-2015-0748/hplip-3.14.10-5.fc21