python2.7-minimal (2.7.15-4ubuntu4~18.04) IndentationError: unexpected indent on apt-get dist-upgrade

Bug #1838674 reported by A J M
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-defaults (Ubuntu)
New
Undecided
Unassigned

Bug Description

When apt-get update, apt-get dist-upgrade run into this issue

# apt-get dist-upgrade
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.
2 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 python2.7-minimal (2.7.15-4ubuntu4~18.04) ...
Sorry: IndentationError: unexpected indent (sitecustomize.py, line 9)
dpkg: error processing package python2.7-minimal (--configure):
 installed python2.7-minimal package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of python2.7:
 python2.7 depends on python2.7-minimal (= 2.7.15-4ubuntu4~18.04); however:
  Package python2.7-minimal is not configured yet.

dpkg: error processing package python2.7 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 python2.7-minimal
 python2.7
E: Sub-process /usr/bin/dpkg returned an error code (1)

My system is:
# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

# dpkg --configure -a
produces similar output
Setting up python2.7-minimal (2.7.15-4ubuntu4~18.04) ...
Sorry: IndentationError: unexpected indent (sitecustomize.py, line 9)
dpkg: error processing package python2.7-minimal (--configure):
 installed python2.7-minimal package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of python2.7:
 python2.7 depends on python2.7-minimal (= 2.7.15-4ubuntu4~18.04); however:
  Package python2.7-minimal is not configured yet.

dpkg: error processing package python2.7 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 python2.7-minimal
 python2.7

# apt-cache policy python2.7-minimal
python2.7-minimal:
  Installed: 2.7.15-4ubuntu4~18.04
  Candidate: 2.7.15-4ubuntu4~18.04
  Version table:
 *** 2.7.15-4ubuntu4~18.04 500
        500 http://ca.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.7.15~rc1-1ubuntu0.1 500
        500 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
     2.7.15~rc1-1 500
        500 http://ca.archive.ubuntu.com/ubuntu bionic/main amd64 Packages

I expected python2.7-minimal to install without an indentation error

What happened was: Sorry: IndentationError: unexpected indent (sitecustomize.py, line 9)

Revision history for this message
A J M (jgmtfia) wrote :

When running apport-collect I get :

The authorization page:
 (https://launchpad.net/+authorize-token?oauth_token=zRC2176wrDjQZf7NNZ4n&allow_permission=DESKTOP_INTEGRATION)
should be opening in your browser. Use your browser to authorize
this program to access Launchpad on your behalf.
Waiting to hear from Launchpad about your decision...
Package python-defaults not installed and no hook available, ignoring

and then apport hangs for 5 minutes. I'll let it run some more, but at least I tried 8)

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.