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) |
|