Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install a multifunctional printer Laserjet M1212nf MFP on Ubuntu 12.04. I downloaded and install the hplip indicated by the official web site. At the end of the installation I chose reboot the whole system and next I call hp-setup in the terminal (as normal user and then as root). After select in the dialog box my printer I got the following error:

Searching... (bus=usb, search=(None), desc=0)<br>
/Traceback (most recent call last):<br>
  File "/usr/share/hplip/ui4/", line 1255, in NextButton_clicked<br>
  File "/usr/share/hplip/ui4/", line 690, in showAddPrinterPage<br>
  File "/usr/share/hplip/ui4/", line 1079, in readwriteFaxInformation<br>
    self.fax_name_company = unicode(d.getStationName())<br>
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 20: ordinal not in range(128)

I think at this stage the plugin should be downloaded, but it is not working. Any suggestion on how to solve this problem ?


After running hp-toolbox I got the following error message :

Unable to communicate with device (code=12): hp:/usb /HP_LaserJet_Professional_M1212nf_MFP?serial=000000000ST10HPQSI1c

share|improve this question

I think the problem is with return content_type, content.encode('utf-8'). The solution is the replace the characters to modify the program line:

return content_type, content.encode('utf-8') as
return content_type, content.decode('utf-8', 'replace').encode('utf-8')

This does nothing just replaces the character. refer to this

Maybe this can help you out

share|improve this answer
thanks for reply ashutosh, Could you give me the file name where I should write this modification ? – Leandro Apr 30 '12 at 21:35
It's just there in the error output. it's /usr/share/hplip/ui4/ Try making change there – ashutosh Apr 30 '12 at 21:38
I did not find any entry in this file with return content_type or content.encode('utf-8'). Is there any other file that I should look at ? – Leandro Apr 30 '12 at 21:53
Maybe you can see if /usr/share/ is not missing rootfs. If that is the problem, trying adding the file to rootfs – ashutosh Apr 30 '12 at 22:07
This can be another problem, I don't have this file in this directory. Perhaps I should fill a bug report on launchpad. Thanks anyway! – Leandro Apr 30 '12 at 22:20

I realise this is an old question. But I searched SOOO MUCH to fix the issue with

    Unable to communicate with device (code=12):

also other errors I saw

    Unable to communicate with the device. Please check the device and try again.
    error: No device found that support this feature
    error: io/hpmud/jd.c 93: unable to read device-id

For me the problem was NOT with the computer but with the configuration of the printer throught the web interface of the printer, in network, smnp where you need to ALLOW read/write access to SMNP.

My setup is with HPLIP, with a laserjet multifunction, on a network connection (not USB).

share|improve this answer
This answer suggests only one thing, "to ALLOW read/write access to SMNP", which may not be useful for USB connection case that is asked by the question. – clearkimura Dec 2 '15 at 19:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.