package python-cryptography 1.2.3-1 failed to install/upgrade: subprocess new pre-removal script returned error exit status 1

Bug #1647901 reported by Clodoaldo Rodrigues
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-cryptography (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Whe I'm connecting to the system display these error

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: python-cryptography 1.2.3-1
ProcVersionSignature: Ubuntu 4.4.0-51.72-generic 4.4.30
Uname: Linux 4.4.0-51-generic i686
NonfreeKernelModules: nvidia
ApportVersion: 2.20.1-0ubuntu2.1
Architecture: i386
Date: Wed Nov 30 23:55:28 2016
ErrorMessage: subprocess new pre-removal script returned error exit status 1
InstallationDate: Installed on 2015-10-22 (411 days ago)
InstallationMedia: Ubuntu 15.04 "Vivid Vervet" - Release i386 (20150422)
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.1
 apt 1.2.15
SourcePackage: python-cryptography
Title: package python-cryptography 1.2.3-1 failed to install/upgrade: subprocess new pre-removal script returned error exit status 1
UpgradeStatus: Upgraded to xenial on 2016-05-02 (218 days ago)

Revision history for this message
Clodoaldo Rodrigues (rodrigcj) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Nish Aravamudan (nacc) wrote :

Hello and thank you for filing this bug report.

It seems like you must have some local configuration change, as the issue is:

Preparing to unpack .../python-cryptography_1.2.3-1ubuntu0.1_i386.deb ...
  File "/usr/bin/pyclean", line 63
    except (IOError, OSError), e:
                             ^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
  File "/usr/bin/pyclean", line 63
    except (IOError, OSError), e:
                             ^
SyntaxError: invalid syntax
dpkg: error processing archive /var/cache/apt/archives/python-cryptography_1.2.3-1ubuntu0.1_i386.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1

which is not a syntax error in python2, but is in python3. Did you by any chance change your default python interpreter (/usr/bin/python) to python3 (not recommended or allowed by PEP).

Can you provide:

apt-cache policy python-minimal
python -V

outputs?

Changed in python-cryptography (Ubuntu):
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in python-cryptography (Ubuntu):
status: Incomplete → Expired
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.