package python-defusedxml 0.4.1-2build1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1680573 reported by Thomas
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
defusedxml (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I get this error whenever I use apt-get install or remove or something like that.

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: python-defusedxml 0.4.1-2build1
ProcVersionSignature: Ubuntu 4.8.0-46.49~16.04.1-generic 4.8.17
Uname: Linux 4.8.0-46-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
Date: Thu Apr 6 20:02:28 2017
Dependencies:

ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2017-04-04 (2 days ago)
InstallationMedia: Ubuntu 16.04.2 LTS "Xenial Xerus" - Release amd64 (20170215.2)
PackageArchitecture: all
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.1
 apt 1.2.19
SourcePackage: defusedxml
Title: package python-defusedxml 0.4.1-2build1 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Thomas (tfatni) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Thomas (tfatni) wrote :

After that error if I try sudo apt-get autoremove I get the following error:

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up python-defusedxml (0.4.1-2build1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-defusedxml (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-lzma (0.5.3-3) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-lzma (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-wstools (0.4.3-3) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-wstools (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up python-magic (1:5.25-2ubuntu1) ...
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error processing package python-magic (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 python-defusedxml
 python-lzma
 python-wstools
 python-magic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Any ideas what can I do?

Thank you very much for your help!

Thomas

Revision history for this message
Thomas (tfatni) wrote :

Hi,

I changed python alternatives from 3.5 to 2.7 and then to 3. Doing so I could remove all above errors. It seems that some dependencies are not dissolved automatically.

Thomas

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in defusedxml (Ubuntu):
status: New → Confirmed
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Hi Thomas,

It sounds like you changed /usr/bin/python, and it is no longer a symlink to /usr/bin/python2.7. Is that the case?

ConfigParser is part of the Python 2.7 stdlib. In Python 3 it was
renamed to configparser, so the debpython module won't work with Python
3.

I'm going to mark this bug as Invalid. If this is not the case then please set back to new.

Thanks,
Corey

Changed in defusedxml (Ubuntu):
status: Confirmed → Invalid
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.