ImportError: No module named 'chardet'

Bug #1817988 reported by aji
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
update-notifier (Ubuntu)
Expired
Low
Unassigned

Bug Description

$ sudo /etc/init.d/networking restart ; sudo apt-get update ; sudo apt-get upgrade ; sudo apt-get dist-upgrade; sudo apt autoremove ;

...
...

Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up update-notifier-common (3.168.9) ...
Traceback (most recent call last):
  File "/usr/lib/update-notifier/package-data-downloader", line 24, in <module>
    import debian.deb822
  File "/usr/lib/python3/dist-packages/debian/deb822.py", line 38, in <module>
    import chardet
ImportError: No module named 'chardet'
dpkg: error processing package update-notifier-common (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 update-notifier-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up update-notifier-common (3.168.9) ...
Traceback (most recent call last):
  File "/usr/lib/update-notifier/package-data-downloader", line 24, in <module>
    import debian.deb822
  File "/usr/lib/python3/dist-packages/debian/deb822.py", line 38, in <module>
    import chardet
ImportError: No module named 'chardet'
dpkg: error processing package update-notifier-common (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 update-notifier-common
E: Sub-process /usr/bin/dpkg returned an error code (1)
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up update-notifier-common (3.168.9) ...
Traceback (most recent call last):
  File "/usr/lib/update-notifier/package-data-downloader", line 24, in <module>
    import debian.deb822
  File "/usr/lib/python3/dist-packages/debian/deb822.py", line 38, in <module>
    import chardet
ImportError: No module named 'chardet'
dpkg: error processing package update-notifier-common (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 update-notifier-common

Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report, what's the output of
 $ dpkg -l | grep chardet:
and
$ python3 -c 'import chardet'

Changed in update-notifier (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for update-notifier (Ubuntu) because there has been no activity for 60 days.]

Changed in update-notifier (Ubuntu):
status: Incomplete → Expired
Revision history for this message
l-luk (l-luk) wrote :

The problem is that there are multiple versions of Python 3, you need to fix the symbolic link /usr/bin/python3 to the latest installed version of Python3

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.