Unattended do-release-upgrade fails with Python import error

Bug #1661849 reported by Cerin
22
This bug affects 5 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Trying to do an unattended upgrade of Ubuntu 14.04 to 16.04 with:

    sudo do-release-upgrade -f DistUpgradeViewNonInteractive

fails with the Python traceback:

    Configuration file '/etc/default/rcS'
     ==> Modified (by you or by a script) since installation.
     ==> Package distributor has shipped an updated version.
       What would you like to do about it ? Your options are:
        Y or I : install the package maintainer's version
        N or O : keep your currently-installed version
          D : show the differences between the versions
          Z : start a shell to examine the situation
     The default action is to keep your current version.
    *** rcS (Y/I/N/O/D/Z) [default=N] ? Error in sys.excepthook:
    Traceback (most recent call last):
      File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
        from apport.fileutils import likely_packaged, get_recent_crashes
      File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
        from apport.report import Report
      File "/usr/lib/python3/dist-packages/apport/report.py", line 15, in <module>
        import xml.dom, xml.dom.minidom
    ImportError: No module named 'xml.dom'

    Original exception was:
    Traceback (most recent call last):
      File "/tmp/ubuntu-release-upgrader-8dpb24f4/xenial", line 8, in <module>
        sys.exit(main())
      File "/tmp/ubuntu-release-upgrader-8dpb24f4/DistUpgrade/DistUpgradeMain.py", line 242, in main
        if app.run():
      File "/tmp/ubuntu-release-upgrader-8dpb24f4/DistUpgrade/DistUpgradeController.py", line 1876, in run
        return self.fullUpgrade()
      File "/tmp/ubuntu-release-upgrader-8dpb24f4/DistUpgrade/DistUpgradeController.py", line 1841, in fullUpgrade
        if not self.doDistUpgrade():
      File "/tmp/ubuntu-release-upgrader-8dpb24f4/DistUpgrade/DistUpgradeController.py", line 1182, in doDistUpgrade
        res = self.cache.commit(fprogress,iprogress)
      File "/tmp/ubuntu-release-upgrader-8dpb24f4/DistUpgrade/DistUpgradeCache.py", line 286, in commit
        apt.Cache.commit(self, fprogress, iprogress)
      File "/usr/lib/python3/dist-packages/apt/cache.py", line 501, in commit
        # which is less than optimal!
      File "/usr/lib/python3/dist-packages/apt/cache.py", line 465, in install_archives

      File "/tmp/ubuntu-release-upgrader-8dpb24f4/DistUpgrade/DistUpgradeView.py", line 234, in run
        res = os.WEXITSTATUS(self.wait_child())
      File "/tmp/ubuntu-release-upgrader-8dpb24f4/DistUpgrade/DistUpgradeView.py", line 200, in wait_child
        self.update_interface()
      File "/tmp/ubuntu-release-upgrader-8dpb24f4/DistUpgrade/DistUpgradeViewNonInteractive.py", line 221, in update_interface
        os.write(self.master_fd,chr(3))
    TypeError: 'str' does not support the buffer interface

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: ubuntu-release-upgrader-core 1:16.04.21
ProcVersionSignature: Ubuntu 4.4.0-62.83-generic 4.4.40
Uname: Linux 4.4.0-62-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.5
Architecture: amd64
CrashDB: ubuntu
CurrentDesktop: GNOME
Date: Sat Feb 4 09:41:55 2017
InstallationDate: Installed on 2017-01-21 (13 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
PackageArchitecture: all
SourcePackage: ubuntu-release-upgrader
UpgradeStatus: No upgrade log present (probably fresh install)

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

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

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Confirmed
Revision history for this message
Christian Schmidt (xgione) wrote :

Same Problem here with ntp:

Configuration file '/etc/ntp.conf'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ? Your options are:
    Y or I : install the package maintainer's version
    N or O : keep your currently-installed version
      D : show the differences between the versions
      Z : start a shell to examine the situation
 The default action is to keep your current version.
*** ntp.conf (Y/I/N/O/D/Z) [default=N] ?

Revision history for this message
Erik Hj (erikhj) wrote :

Similar issue:

Configuration file '/etc/default/rcS'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ? Your options are:
    Y or I : install the package maintainer's version
    N or O : keep your currently-installed version
      D : show the differences between the versions
      Z : start a shell to examine the situation
 The default action is to keep your current version.
*** rcS (Y/I/N/O/D/Z) [default=N] ?
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 15, in <module>
    import xml.dom, xml.dom.minidom
ImportError: No module named 'xml.dom'

Original exception was:
Traceback (most recent call last):
  File "/tmp/ubuntu-release-upgrader-q8tt9j6b/xenial", line 8, in <module>
    sys.exit(main())
  File "/tmp/ubuntu-release-upgrader-q8tt9j6b/DistUpgrade/DistUpgradeMain.py", line 242, in main
    if app.run():
  File "/tmp/ubuntu-release-upgrader-q8tt9j6b/DistUpgrade/DistUpgradeController.py", line 1876, in run
    return self.fullUpgrade()
  File "/tmp/ubuntu-release-upgrader-q8tt9j6b/DistUpgrade/DistUpgradeController.py", line 1841, in fullUpgrade
    if not self.doDistUpgrade():
  File "/tmp/ubuntu-release-upgrader-q8tt9j6b/DistUpgrade/DistUpgradeController.py", line 1182, in doDistUpgrade
    res = self.cache.commit(fprogress,iprogress)
  File "/tmp/ubuntu-release-upgrader-q8tt9j6b/DistUpgrade/DistUpgradeCache.py", line 286, in commit
    apt.Cache.commit(self, fprogress, iprogress)
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 501, in commit
    # which is less than optimal!
  File "/usr/lib/python3/dist-packages/apt/cache.py", line 465, in install_archives

  File "/tmp/ubuntu-release-upgrader-q8tt9j6b/DistUpgrade/DistUpgradeView.py", line 234, in run
    res = os.WEXITSTATUS(self.wait_child())
  File "/tmp/ubuntu-release-upgrader-q8tt9j6b/DistUpgrade/DistUpgradeView.py", line 200, in wait_child
    self.update_interface()
  File "/tmp/ubuntu-release-upgrader-q8tt9j6b/DistUpgrade/DistUpgradeViewNonInteractive.py", line 221, in update_interface
    os.write(self.master_fd,chr(3))
TypeError: 'str' does not support the buffer interface

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.