Debugging Python MK007  

UnicodeDecodeError: E: sub process returned an error code

How to fix ‘UnicodeDecodeError’ in Linux

Hi Geeks,

In this post, am going to show you how to solve the following error in Kali Linux. The steps followed in this post is same to all Debian Linux distributions. Read the whole blog for better understanding.

E: problem executing scripts APT::update:post-invoke-success
file /usr/share/commnd-not-found/CommandNorFound/db/creator.py
UnicodeDecodeError: 'utf-8' code can't decode byte 0xed in position 15: Invalid continuation byte
E: sub process returned an error code

Why this error Occurred ?

 When I ran any commends in Linux terminal the following error message was showed. It is a python DPKG error. In your system any python packages are missing, then you was encountered by this error. During executing python, you was encountered by this error. Then no problem.

But it shows the message all the time. Even update commend also encountered by this error. But it doesn’t stop the process of the commend. Only shows the useless error message. But it makes you feel annoying. So you want to debug this error.

E: problem executing scripts APT::update:post-invoke-success 
file /usr/share/commnd-not-found/CommandNorFound/db/creator.py 
UnicodeDecodeError: 'utf-8' code can't decode byte 0xed in position 15: Invalid continuation byte 
E: sub process returned an error code

Solution for UnicodeDecodeError:

In your system you want to install the missed python packages. No need for installing the missed packages manually. Simply update and upgrade your system. Finally reboot it. During this process all the missed python packages are automatically installed.

Open a terminal and run the following commends,

mk007@linuxlia:~$ sudo apt-get update
mk007@linuxlia:~$ sudo apt-get dist-upgrade
mk007@linuxlia:`$ sudo reboot

Some other Python Bugs:

PIP: Command not found

Import Error no Module Named

Python 2.7 End of life

Python & Debugging Tutorial

Pychram Tutorial

If you want to learn about PyCharm and software development. Then this is for you geeks.

Conclusion:

If you have any doubts about this post please leave a comment otherwise ping me in Instagram. Am ready to solve your doubts.

Leave A Comment