Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

1 Answer 1

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

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.