[Bug 2144546] Re: GLib.markup_escape_text TypeError in DistUpgradeViewGtk3

Hubscher-remy 2144546 at bugs.launchpad.net
Mon Mar 16 10:58:16 UTC 2026


Traceback (most recent call last):

  File "/usr/lib/ubuntu-release-upgrader/do-partial-upgrade", line 114, in <module>
    controller.doPartialUpgrade()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^

  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py", line 1940, in doPartialUpgrade
    if not self.askDistUpgrade():
           ~~~~~~~~~~~~~~~~~~~^^

  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py", line 1234, in askDistUpgrade
    res = self._view.confirmChanges(_("Do you want to start the upgrade?"),
                                    changes,
                                    self.cache.required_download)

  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeViewGtk3.py", line 714, in confirmChanges
    pkg.name, GLib.markup_escape_text(getattr(pkg.candidate, "summary", None)))])
              ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3/dist-packages/gi/overrides/GLib.py", line 417, in markup_escape_text
    return GLib.markup_escape_text(text, length)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^

TypeError: Argument 0 does not allow None as a value

Traceback (most recent call last):
  File "/usr/lib/ubuntu-release-upgrader/do-partial-upgrade", line 114, in <module>
    controller.doPartialUpgrade()
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py", line 1940, in doPartialUpgrade
    if not self.askDistUpgrade():
           ~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeController.py", line 1234, in askDistUpgrade
    res = self._view.confirmChanges(_("Do you want to start the upgrade?"),
                                    changes,
                                    self.cache.required_download)
  File "/usr/lib/python3/dist-packages/DistUpgrade/DistUpgradeViewGtk3.py", line 714, in confirmChanges
    pkg.name, GLib.markup_escape_text(getattr(pkg.candidate, "summary", None)))])
              ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/gi/overrides/GLib.py", line 417, in markup_escape_text
    return GLib.markup_escape_text(text, length)
           ~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
TypeError: Argument 0 does not allow None as a value

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ubuntu-release-upgrader in
Ubuntu.
https://bugs.launchpad.net/bugs/2144546

Title:
  GLib.markup_escape_text TypeError in DistUpgradeViewGtk3

Status in ubuntu-release-upgrader package in Ubuntu:
  New

Bug description:
  Location: DistUpgradeViewGtk3.py, line 714, in confirmChanges()

  Error:

  TypeError: Argument 0 does not allow None as a value
  Cause:
  confirmChanges() passes the result of getattr(pkg.candidate, "summary", None) to GLib.markup_escape_text(). When a package has no candidate or no summary, this is None. GLib.markup_escape_text() expects a string and does not accept None, so it raises the above TypeError.

  When it happens:
  During a distribution upgrade or partial upgrade when the GTK3 UI shows the confirmation dialog and one of the packages in the change list has a missing or empty summary.

  Impact:
  The upgrade UI crashes instead of showing the confirmation dialog, blocking the upgrade.

  Fix:
  Ensure a string is always passed to GLib.markup_escape_text(), e.g. by using an empty string when the summary is None:

  GLib.markup_escape_text(getattr(pkg.candidate, "summary", None) or "")

  Status:
  No matching bug found on Launchpad; this appears to be a new report.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/2144546/+subscriptions




More information about the foundations-bugs mailing list