LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-07-2019, 08:45 PM   #1
jasonc3a
LQ Newbie
 
Registered: Oct 2018
Distribution: Pop!OS, Ubuntu, Debian, Fedora, Raspbian
Posts: 14

Rep: Reputation: Disabled
HPLIP Oddity


Hi. I recently got a new video card and had to install some drivers for it. The process was all a bit fussy, and it ended up with me having to reinstall my / and /usr partitions fresh with Ubuntu 18.04 LTS.
Im back up to normal operating condition with one exception: HPLIP won't install the plugin for my printer. When running it from the terminal via
Code:
$ hp-setup
it brings up the gui and I make my way through the options and menu. I know it won't find my printer on the network when it searches (for whatever reason), so I manually enter the IP address and it shows that it can see it on the "Discovered Devices" page. However, when I get to the "Driver Plug-in Installation" page, everything falls apart. In the terminal I get this:
Code:
Checking for network connection...
Downloading plug-in from: 
Traceback (most recent call last):
  File "/usr/share/hplip/ui5/plugindialog.py", line 248, in NextButton_clicked
    status, download_plugin_file, error_str = self.pluginObj.download(self.plugin_path,self.plugin_download_callback)
  File "/usr/share/hplip/installer/pluginhandler.py", line 260, in download
    sts, url, checksum = self.__getPluginInformation(callback)
  File "/usr/share/hplip/installer/pluginhandler.py", line 203, in __getPluginInformation
    plugin_conf_p = ConfigBase(local_conf)
  File "/usr/share/hplip/base/g.py", line 89, in __init__
    self.read()
  File "/usr/share/hplip/base/g.py", line 130, in read
    self.conf.readfp(fp)
  File "/usr/lib/python3.6/configparser.py", line 763, in readfp
    self.read_file(fp, source=filename)
  File "/usr/lib/python3.6/configparser.py", line 718, in read_file
    self._read(f, source)
  File "/usr/lib/python3.6/configparser.py", line 1015, in _read
    for lineno, line in enumerate(fp, start=1):
  File "/usr/lib/python3.6/codecs.py", line 321, in decode
    (result, consumed) = self._buffer_decode(data, self.errors, final)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x90 in position 10: invalid start byte

Done.
error:  The device you are trying to setup requires a binary plug-in. Some functionalities may not work as expected without plug-ins.  Please run 'hp-plugin' as normal user to install plug-ins.   Visit  http://hplipopensource.com  for more infomation. 

Done.
Installing this HP printer always seems to be an issue, and eventually something happens after numerous attempts and I make it work, but I can never see why it eventually installs the plugin or what I've changed or done to make it happen. This is the first time I've tried running the setup via the terminal, but doing it from the launcher icon yields the same result (it shows that it's doing something via the little cursor spinning, then just stops and returns to the regular pointer cursor).
Has anybody else encountered this issue, and if so, what solves it? Thanks pre-emptively for any information!

Last edited by jasonc3a; 12-09-2019 at 08:11 PM.
 
Old 12-07-2019, 09:25 PM   #2
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 15,780
Blog Entries: 27

Rep: Reputation: 4632Reputation: 4632Reputation: 4632Reputation: 4632Reputation: 4632Reputation: 4632Reputation: 4632Reputation: 4632Reputation: 4632Reputation: 4632Reputation: 4632
It might help to know the model of the printer. The only time I've encountered an issue installing a printer with HPLIP is when the printer was too new for the version of HPLIP installed on my system.

Also, please surround terminal output with code tags, which become available when you click the "Go Advanced" button beneath the compose/edit post window.
 
1 members found this post helpful.
Old 12-07-2019, 10:07 PM   #3
jasonc3a
LQ Newbie
 
Registered: Oct 2018
Distribution: Pop!OS, Ubuntu, Debian, Fedora, Raspbian
Posts: 14

Original Poster
Rep: Reputation: Disabled
Good point, I see I neglected to include that information and apologize. It is an HP Color Laserjet MFP M277dw.
 
Old 12-09-2019, 05:29 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,880

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
I don't know the particular printer, but on some of the cheaper ones, hplip will not set up the ip on the printer. I had a marathon battle trying to set up Laserjet Professional P1102W. HPLIP refused to set up an IP. Eventually, I had to use the install disk under windows to set up the IP, and had to report that solution on a thread here. A moderator chimed in with his experience that there was no other way.

It's good to check if your IP is good. Can you ping it?
 
1 members found this post helpful.
Old 12-09-2019, 05:55 AM   #5
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,994
Blog Entries: 1

Rep: Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846
Perhaps it's a python2 script trying to run in python3+.

For networked printers cups-browsed needs to be running (and exim4 as cups does job management with email). TBH, I've never used hp-setup, I just set things up in cups (localhost:631). Which often times means manually installing the .ppd for the printer. And ensuring odd dependencies (not grabbed by package management) are met, like pnm2ppa. And long ago the ghostscript stuff that HP uses to "translate" printer stuff to printer / model specific stuff that is useful for their printers.
 
1 members found this post helpful.
Old 12-09-2019, 05:58 AM   #6
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,994
Blog Entries: 1

Rep: Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846
On my one remaining / functional HP printer (networked), I had to setup the IP for the printer in /etc/hosts on the client. With the printers server name. And the last time I tried networking it on a pi with raspbian, it would print, but not really useful output with the arm based drivers. Works fine on any of my x86 laptops though.
 
1 members found this post helpful.
Old 12-09-2019, 07:43 PM   #7
jasonc3a
LQ Newbie
 
Registered: Oct 2018
Distribution: Pop!OS, Ubuntu, Debian, Fedora, Raspbian
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
It's good to check if your IP is good. Can you ping it?
Yes sir, pinged it and it all comes through fine. Was able to access it on my Windows partition and on my wife's Ubuntu partition in the other room as well. It is not an especially cheap printer seeing as it is a Color Laserjet, but I can't see many signs that is a particularly popular printer either.
Quote:
Originally Posted by Shadow_7 View Post
Perhaps it's a python2 script trying to run in python3+.
I suspected something similar. I tried removing python 2 and 3 individually and giving it a shot, but the results could be best described as cataclysmic and I basically ruined my installations. Even Windows 10 somehow. I've dealt with CUPS before but it always felt like I was just trading one headache for another, and finding the ppd files has also proven to be a nightmare. I enjoy the hp-setup route because it just seems to work and has proven the most reliable (for me at least) way to access the scanner function.

I figured it out, but my original solution was strange and inconsistent. I could get fewer (or at least different) errors once I attempted a few networking changes. These included: changing my DNS on the desktop in question from "automatic" to 1.1.1.1, changing the firewall profile on the desktop to "trusted", moving the printer and desktop both onto a dumb switch so there were no other pieces of network hardware to cause any issues, turning off pfBlocker-NG in pfsense, disabling all but the most basic of firewall rules in pfsense, and disabling the DNS Resolver service in pfsense.

By doing all of these things I could finally download the plugin. I suspect some particular network configurations and/or hardware, either singularly or in combination, was preventing hp-setup from talking to whatever server it needed to to grab the plugins, and that ended up spitting out errors in the python scripts it was using. This allowed me to get to the final page where I could click "Add Printer" and it should work fine.

It did not work fine. It contined to ask for my username and password because I did not "have the authority to add a printer". It unhelpfully did not specifying WHICH username or password. Going to the IP address of the printer in a browser lets you set the password, and the username is always blank, although it does point out that if you NEED a username you can just use "username". Blank + printer password, username + printer password, and linux username + linux password would cause an error and require me to start all over.

I forget exactly where I found the information, but somebody on the internet said to make sure my user was part of the "lp" group. So I added the user to that group and it worked. Sometimes. I was having a bit of trouble with my partitions so there were plenty of chances for me to reinstall linux and try again and again and again. I also tried to run
Code:
$ sudo hp-setup
to give myself the authority but it wasn't going to have any of that, telling me that it was not intended to be run with the "sudo" (although it will let me do that now for some reason as I just tried it and it worked fine, so I don't know).

Finally, when combining ALL of the previous alterations I made (network settings, hardware changes, adding user to groups), I did one more thing different that delivered consistent results. In the terminal I tried
Code:
$ sudo su
$ hp-setup
and that's what made it finally and consistently work. What a nightmare. Thank you for all of your help, I really appreciate it! Hopefully (maaaaaaaybe???) this might be useful for somebody else at some point. Also, appologies if some of my grammar when referring to things I did is a bit goofy, I just tried to bang this out as quick as possible while I had my list of troubleshooting steps in front of me. If you have suggestions to make my post more readable please tell me and I'll edit it. Thanks again!

Last edited by jasonc3a; 12-09-2019 at 08:09 PM.
 
Old 12-10-2019, 05:20 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,880

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Wow. A typical cups shaggy dog story. It appears, along with all it's other problems, cups is not prepared for the real networking world.

I hate python without knowing python, because the reaction of most python programmers to finding a bug seems to be to leave the bug alone and in place, but write another script or three to mitigate or circumvent the problem. They _never_ seem to debug & solve it, probably because they're just calling modules.
 
Old 12-10-2019, 10:38 AM   #9
jasonc3a
LQ Newbie
 
Registered: Oct 2018
Distribution: Pop!OS, Ubuntu, Debian, Fedora, Raspbian
Posts: 14

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
Wow. A typical cups shaggy dog story.
Yeah, I didn't mean for it to be as long and anticlimactic as it was. Having found a reliable solution (and now I can scan my homework in for digital submissions), I think I'll spend some time familiarizing myself with CUPS so that I have more flexibility and a less pain-in-the-neck process for adding a printer.
 
Old 12-11-2019, 05:48 AM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,880

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
Quote:
Originally Posted by jasonc3a View Post
Yeah, I didn't mean for it to be as long and anticlimactic as it was. Having found a reliable solution (and now I can scan my homework in for digital submissions), I think I'll spend some time familiarizing myself with CUPS so that I have more flexibility and a less pain-in-the-neck process for adding a printer.
That is probably a complete waste of time. I tried it, and gave up before I ended up in a home for the bewildered. The range of cups errors is huge, and it's trying to tame various bits of hardware, and then call ghostscript with the correct options for the actual print job. It's supposed to be a scheduler, but who wants that? Did you ever decide today that you want this page printed, but not until tomorrow or next week?
 
Old 12-11-2019, 01:55 PM   #11
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 3,994
Blog Entries: 1

Rep: Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846Reputation: 846
The samsung printer I got used on craigslist was a breeze to setup. Just install package(s) printer-driver-splix. And the cups setup. So many options too. But I need more toner for it ($90), when I bought it for $65.
 
Old 12-11-2019, 02:46 PM   #12
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 10,880

Rep: Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241Reputation: 1241
I wanted a Laser Mono - that's all. I preferred HP because they're known to work with linux. My first Laserjet Pro P1102W was 50, but the toner was 80, and had the wifi issue.

My present one is a Laserjet MFP 130w or somesuch. You set wifi IP on some stupid little panel, which you can ignore thereafter. It has a built in scanner which I use, because with one hand it's difficult to take photos. You need fingers like an octopus' tentacles. It has a fax, presumably because it's part of their SoC. I don't hold that against it. Replacement toner is 36. It seems a better balance if you use toner.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Installing HPLIP-GUI on HPLIP 3.17.11 Linux Mint 17.3 laptop FenderGuy Linux - Software 1 02-26-2018 09:22 PM
[SOLVED] Upgrade hplip-3.9.4b to hplip-3.9.12 (32-bit and 64-bit) tronayne Slackware 8 02-28-2011 12:12 AM
HPlip woes on --current ; Sharing printer gets broken if the hplip gui is launched Old_Fogie Slackware 2 10-28-2010 11:23 AM
Shutdown/Reboot oddity in MDK 8.2 Lindy Linux - Distributions 2 05-20-2002 10:37 AM
Red Hat 7.2 KDE Oddity hibridmatthias Linux - Newbie 2 03-24-2002 11:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration