Activity log for bug #2045507

Date Who What changed Old value New value Message
2023-12-03 16:20:44 David Levine bug added bug
2023-12-03 16:20:44 David Levine attachment added hp-check.log https://bugs.launchpad.net/bugs/2045507/+attachment/5726131/+files/hp-check.log
2023-12-04 23:28:34 David Levine description HP Linux Imaging and Printing System (ver. 3.23.8) Scan Utility ver. 2.2 Fedora 39 This command, with an area br-x (third value) of 86 mm or less: $ hp-scan --area=0,0,86,100 --file=test.pdf Results in this traceback: Closing device. Traceback (most recent call last): File "/bin/hp-scan", line 1353, in <module> utils.format_bytes(bytes_read)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/share/hplip/base/utils.py", line 482, in format_bytes return ''.join([commafy(s), ' B']) ^^^^^^^^^^ File "/usr/share/hplip/base/utils.py", line 477, in commafy return locale.format("%s", val, grouping=True) ^^^^^^^^^^^^^ AttributeError: module 'locale' has no attribute 'format'. Did you mean: '_format'? Oddly, increasing the third (br-x) value in the area to 87 or more resolves the issue. Changing "locale.format" to "locale._format" here also resolves the issue, but I am not sure if it correct: /usr/share/hplip/base# diff utils.py{,.ORIGINAL} 477c477 < return locale._format("%s", val, grouping=True) --- > return locale.format("%s", val, grouping=True) HP Linux Imaging and Printing System (ver. 3.23.8) Scan Utility ver. 2.2 Fedora 39 This command, with an area br-x (third value) of 86 mm or less: $ hp-scan --area=0,0,86,100 --file=test.pdf Results in this traceback: Closing device. Traceback (most recent call last):   File "/bin/hp-scan", line 1353, in <module>     utils.format_bytes(bytes_read))     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^   File "/usr/share/hplip/base/utils.py", line 482, in format_bytes     return ''.join([commafy(s), ' B'])                     ^^^^^^^^^^   File "/usr/share/hplip/base/utils.py", line 477, in commafy     return locale.format("%s", val, grouping=True)            ^^^^^^^^^^^^^ AttributeError: module 'locale' has no attribute 'format'. Did you mean: '_format'? Oddly, increasing the third (br-x) value in the area to 87 or more resolves the issue. Changing "locale.format" to "locale._format" here also resolves the issue, but I am not sure if it is correct: /usr/share/hplip/base# diff utils.py{,.ORIGINAL} 477c477 < return locale._format("%s", val, grouping=True) --- > return locale.format("%s", val, grouping=True)
2024-03-18 15:06:16 zdohnal bug watch added https://bugzilla.redhat.com/show_bug.cgi?id=2270031
2024-03-18 15:06:16 zdohnal attachment added Proposed patch https://bugs.launchpad.net/hplip/+bug/2045507/+attachment/5756828/+files/hplip-locale-format.patch