distupgrade 'ConfigParser' object has no attribute 'readfp'

Bug #2060152 reported by Gerald Quintana
18
This bug affects 4 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Running on Noble, after running apt dist-upgrade, in the recovery menu, run dpkg mode which in turn runs

python3 /usr/lib/python3/dist-packages/DistUpgrade/dist-upgrade.py --partial --frontend DistUpgradeViewText --datadir /usr/share/ubuntu-release-upgrader

2024-04-03 20:10:04,192 INFO Using config files '['/usr/share/ubuntu-release-upgrader/DistUpgrade.cfg', '/etc/update-manager/release-upgrades.d/ubuntu-advantage-upgrades.cfg']'
2024-04-03 20:10:04,192 INFO uname information: 'Linux huahine 6.8.0-11-generic #11-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 14 00:29:05 UTC 2024 x86_64'
2024-04-03 20:10:04,367 INFO apt version: '2.7.14'
2024-04-03 20:10:04,368 INFO python version: '3.12.2 (main, Mar 19 2024, 00:13:04) [GCC 13.2.0]'
2024-04-03 20:10:04,369 INFO release-upgrader version '24.04.11' started
2024-04-03 20:10:04,371 INFO locale: 'fr_FR' 'UTF-8'
2024-04-03 20:10:04,392 INFO screen could not be run
2024-04-03 20:10:04,405 DEBUG Using 'DistUpgradeViewText' view
2024-04-03 20:10:04,423 DEBUG enable dpkg --force-overwrite
2024-04-03 20:10:04,463 DEBUG lsb-release: 'noble'
2024-04-03 20:10:04,464 DEBUG _pythonSymlinkCheck run
2024-04-03 20:10:04,468 ERROR not handled exception:
Traceback (most recent call last):

  File "/usr/lib/python3/dist-packages/DistUpgrade/dist-upgrade.py", line 8, in <module>
    sys.exit(main())
             ^^^^^^

  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeMain.py", line 233, in main
    if not app.doPartialUpgrade():
           ^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py", line 2609, in doPartialUpgrade
    self.prepare()

  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py", line 465, in prepare
    if not self._pythonSymlinkCheck():
           ^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py", line 415, in _pythonSymlinkCheck
    config.readfp(f)
    ^^^^^^^^^^^^^

AttributeError: 'ConfigParser' object has no attribute 'readfp'. Did you mean: 'read'?

2024-04-03 20:10:04,469 DEBUG running apport_crash()

python3-distupgrade 1:24.04.11

Revision history for this message
Gerald Quintana (gerald.quintana) 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
Churchill Lee (feliciousx) wrote :

Facing this error after an upgrade. Is there a way to revert an upgrade?

Revision history for this message
Mohamed Anwer (mohammed-ahmed-anwer) wrote :

I opened this file "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py" in text editor and modified the "_pythonSymlinkCheck" function to return "True" and re-ran dpkg again and it worked!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.