slackware-current: hp-setup from hplip-3.23.12-x86_64-4 throws UnicodeDecodeError after selecting printer
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
LC_TIME=en_GB.UTF-8 when I would expect LC_TIME="en_US.UTF-8"
There is a small change in the order between different English locales:
Code:
$ LC_TIME=en_GB.UTF-8 date
Sun 28 Apr 19:20:58 EEST 2024
$ LC_TIME=en_US.UTF-8 date
Sun Apr 28 19:20:59 EEST 2024
$ LC_TIME=en_AU.UTF-8 date
Sun 28 Apr 2024 19:21:00 EEST
I have used this recent update, but I am only able to complete the process of adding a printer. The printer is still not in the list and cannot be used.
Attachment 42753
I have used this recent update, but I am only able to complete the process of adding a printer. The printer is still not in the list and cannot be used.
I think HP is screwing with the locale somewhere, which is big no-no if that's whats happening. You should be able to work around it by running the setup utility from a shell and explicitly setting LC_CTYPE to 'C' or 'POSIX':
Code:
$ LC_CTYPE=POSIX hp-setup
you can also skip the GUI nonsense and run interactive with
change the generated models.dat file to only have ASCII characters. AFAIK HP are the ones distributing it, so if it should be ASCII then they should ensure there are no non-ascii characters in there.
or if models.dat is allowed to have non-ascii characters, they should open the file properly to begin with instead of relying on the default, platform dependent, open behavior.
But I'm not a python guy, and character encoding is right up there with handling time correctly in things I hate dealing with, so I'm .
I think HP is screwing with the locale somewhere, which is big no-no if that's whats happening. You should be able to work around it by running the setup utility from a shell and explicitly setting LC_CTYPE to 'C' or 'POSIX':
Code:
$ LC_CTYPE=POSIX hp-setup
you can also skip the GUI nonsense and run interactive with
change the generated models.dat file to only have ASCII characters. AFAIK HP are the ones distributing it, so if it should be ASCII then they should ensure there are no non-ascii characters in there.
or if models.dat is allowed to have non-ascii characters, they should open the file properly to begin with instead of relying on the default, platform dependent, open behavior.
But I'm not a python guy, and character encoding is right up there with handling time correctly in things I hate dealing with, so I'm .
Weird. You could try to reinstall hplip to make sure nothing is in a bad state. As root,
Code:
slackpkg reinstall hplip
?
What's the output if you don't use the gui?
Code:
hp-setup -i -bnet
What does lpstat show?
Code:
lpstat -t
Failing all that, I wouldn't bother messing with hplip. Just add the printer through CUPS directly through the web UI usually found at http://localhost:631
$ lpstat -t in bash at 08:23:44
scheduler is running
system default destination: HP_OfficeJet_Pro_9010
device for HP_OfficeJet_Pro_9010: ipp://gutenberg1.local:631/ipp/print
HP_OfficeJet_Pro_9010 accepting requests since Wed 01 May 2024 08:24:47 AM EDT
printer HP_OfficeJet_Pro_9010 is idle. enabled since Wed 01 May 2024 08:24:47 AM EDT
And done. Printer shows up in CUPS, System Settings->Printers, etc. Seems a lot simpler than messing with drivers and PPDs.
Weird. You could try to reinstall hplip to make sure nothing is in a bad state. As root,
Code:
slackpkg reinstall hplip
?
What's the output if you don't use the gui?
Code:
hp-setup -i -bnet
What does lpstat show?
Code:
lpstat -t
Failing all that, I wouldn't bother messing with hplip. Just add the printer through CUPS directly through the web UI usually found at http://localhost:631
Make sure you update before you reinstall. Looks like there is a new build of hplip available https://git.slackware.nl/current/com...15e355bf512059 and now that I've run my mouth for so long I'm dying to know if it actually fixes the issue for anyone besides me
Make sure you update before you reinstall. Looks like there is a new build of hplip available https://git.slackware.nl/current/com...15e355bf512059 and now that I've run my mouth for so long I'm dying to know if it actually fixes the issue for anyone besides me
Thank you for generously sharing your findings. I will try my best to solve this problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.