** Changed in: hplip
       Status: New => Confirmed

** No longer affects: hplip (Ubuntu)

** Also affects: hplip (Ubuntu)
   Importance: Undecided
       Status: New

** Changed in: hplip (Ubuntu)
       Status: New => Confirmed

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to hplip in Ubuntu.
https://bugs.launchpad.net/bugs/2045507

Title:
  utils.py attempts to access unknown locale.format attribute

Status in HPLIP:
  Confirmed
Status in hplip package in Ubuntu:
  Confirmed

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/hplip/+bug/2045507/+subscriptions


-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to