package python3-cryptography 1.2.3-1ubuntu0.3 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1

Bug #1935783 reported by Vaughn W Smith
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python3-defaults (Ubuntu)
New
Undecided
Unassigned

Bug Description

would not install updates

ProblemType: Package
DistroRelease: Ubuntu 16.04
Package: python3-cryptography 1.2.3-1ubuntu0.3
ProcVersionSignature: Ubuntu 4.10.0-28.32~16.04.2-generic 4.10.17
Uname: Linux 4.10.0-28-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.30
Architecture: amd64
Date: Sun Jul 11 15:16:59 2021
ErrorMessage: subprocess installed post-installation script returned error exit status 1
InstallationDate: Installed on 2021-07-11 (0 days ago)
InstallationMedia: Ubuntu 16.04.3 LTS "Xenial Xerus" - Release amd64 (20170801)
RelatedPackageVersions:
 dpkg 1.18.4ubuntu1.7
 apt 1.2.35
SourcePackage: python-cryptography
Title: package python3-cryptography 1.2.3-1ubuntu0.3 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
UpgradeStatus: No upgrade log present (probably fresh install)

package:python3-cryptography:1.2.3-1ubuntu0.3
Setting up python3-cryptography (1.2.3-1ubuntu0.3) ...
Traceback (most recent call last):
  File "/usr/bin/py3compile", line 36, in <module>
    from debpython import files as dpf, PUBLIC_DIR_RE, memoize
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 661, in exec_module
  File "<frozen importlib._bootstrap_external>", line 765, in get_code
  File "<frozen importlib._bootstrap_external>", line 476, in _compile_bytecode
ValueError: bad marshal data (unknown type code)
dpkg: error processing package python3-cryptography (--configure):
 subprocess installed post-installation script returned error exit status 1

Revision history for this message
Vaughn W Smith (svw1) wrote :
tags: removed: need-duplicate-check
Bryce Harrington (bryce)
description: updated
Revision history for this message
Bryce Harrington (bryce) wrote :

This type of error typically occurs because the cached .pyc files are out of date for some reason. (C.f. https://www.py4u.net/discuss/17141, https://stackoverflow.com/questions/30861493/how-to-fix-python-valueerrorbad-marshal-data)

This specific issue is occurring not in python-cryptography itself, but rather in the /usr/bin/py3compile call when its trying to import debpython. In other words, something's inconsistent with your system's cached python code. It sounds like perhaps force reinstalling python3-minimal might be worth trying.

affects: python-cryptography (Ubuntu) → python3-defaults (Ubuntu)
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.