TypeError: glib.markup_escape_text() takes at most 1 argument (2 given)

Bug #832745 reported by Lukasz Olszewski on 2011-08-24
This bug affects 305 people
Affects Status Importance Assigned to Milestone
update-manager (Ubuntu)
High
Robert Roth

Bug Description

update-manager crashes after clicking "partial upgrade" (Python error).

** (update-manager:3427): WARNING **: expected enumeration type PangoUnderline, but got Underline instead
ERROR:root:not handled expection:
Traceback (most recent call last):

  File "/usr/bin/update-manager", line 106, in <module>
    controler.doPartialUpgrade()

  File "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeController.py", line 1672, in doPartialUpgrade
    if not self.askDistUpgrade():

  File "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeController.py", line 903, in askDistUpgrade
    self.cache.requiredDownload)

  File "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeViewGtk3.py", line 648, in confirmChanges
    len(pkg.summary)))])

TypeError: glib.markup_escape_text() takes at most 1 argument (2 given)

Traceback (most recent call last):
  File "/usr/bin/update-manager", line 106, in <module>
    controler.doPartialUpgrade()
  File "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeController.py", line 1672, in doPartialUpgrade
    if not self.askDistUpgrade():
  File "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeController.py", line 903, in askDistUpgrade
    self.cache.requiredDownload)
  File "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeViewGtk3.py", line 648, in confirmChanges
    len(pkg.summary)))])
TypeError: glib.markup_escape_text() takes at most 1 argument (2 given)
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeViewGtk3.py", line 467, in _handleException
    apport_crash(type, value, tb)
  File "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeApport.py", line 29, in apport_crash
    report[f.replace(".","").replace("-","")] = (open(f), )
  File "/usr/lib/python2.7/dist-packages/problem_report.py", line 504, in __setitem__
    assert k.replace('.', '').replace('-', '').replace('_', '').isalnum()
AssertionError

Original exception was:
Traceback (most recent call last):
  File "/usr/bin/update-manager", line 106, in <module>
    controler.doPartialUpgrade()
  File "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeController.py", line 1672, in doPartialUpgrade
    if not self.askDistUpgrade():
  File "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeController.py", line 903, in askDistUpgrade
    self.cache.requiredDownload)
  File "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeViewGtk3.py", line 648, in confirmChanges
    len(pkg.summary)))])
TypeError: glib.markup_escape_text() takes at most 1 argument (2 given)

ProblemType: Bug
DistroRelease: Ubuntu 11.10
Package: update-manager 1:0.152.15
ProcVersionSignature: Ubuntu 3.0.0-9.14-generic 3.0.3
Uname: Linux 3.0.0-9-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Wed Aug 24 15:08:17 2011
InstallationMedia: Ubuntu 10.10 "Maverick Meerkat" - Release amd64 (20101007)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, no user)
 LANG=pl_PL.UTF-8
 SHELL=/usr/bin/zsh
SourcePackage: update-manager
UpgradeStatus: Upgraded to oneiric on 2011-08-24 (0 days ago)

Related branches

Lukasz Olszewski (olszewskil) wrote :
Robert Roth (evfool) wrote :

Thank you for taking the time to report this bug. This is strange: it seems to me that the problem is caused by the Ubuntu Desktop PPA being enabled, could you please try disabling the PPA and using the gobject-introspection files from the official repository and see if that helps?
---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Changed in update-manager (Ubuntu):
status: New → Incomplete
Ben Clapp (ibenrunnin) wrote :

I got this error upgrading from ubuntu 11.04 to ubuntu 10.10 beta-1. During the installation (in 11.04) update-manager closed. I went ahead and rebooted, and went back into update-manager. Ran a partial upgrade, have this error, unable to resolve currently. -.-"

Ben Clapp (ibenrunnin) wrote :

Hm, somehow managed to resolve itself? And I have no idea how. In fact, I did absolutely nothing in particular to make it happen; not even a reboot. Weird. >.>"

Philipp Kaluza (pixelpapst) wrote :

@Robert: I don't see how this would be related to the PPA.

This happened because update-manager is trying to report an upgrade error using the apport module, and subsequently went away when the error'ed out upgrade log was not the most recent any more.

Now, we don't know what the original upgrade bug was, that triggered this buggy reporting routine - that might actually have been related to a PPA or whatever.

As apport has a similar problem itself ATM, I'm putting a watch on #839464 - but we might have to dig through update-manager itself after this is solved (so not marking as dup just yet).

Philipp Kaluza (pixelpapst) wrote :
Changed in update-manager (Ubuntu):
status: Incomplete → In Progress
Robert Roth (evfool) on 2011-09-04
Changed in update-manager (Ubuntu):
assignee: nobody → Robert Roth (evfool)
Robert Roth (evfool) wrote :

Thanks Philipp Kaluza for the debdiff. I have commited the changes to a branch and proposed a merge, as reviewing merges is most of the time easier than reviewing debdiffs. I have made the commit with your name and email address, I hope you don't mind. I hope this will get reviewed as soon as possible and get into the trunk and get released before oneiric, otherwise this can become a real crasher for people who want to update from previous releases to Oneiric (Raising the priority because of this to high). Thanks again for the catch.
---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Changed in update-manager (Ubuntu):
importance: Undecided → High
milestone: none → ubuntu-11.10-beta-2
tags: added: bugpattern-needed
Laudeci Oliveira (laudeci) wrote :

sudo apt-get dist-upgrade solved for me.

Yes, Laudeci Oliveira, it worked for me too right now

Anders Ekberg (henry-ekberg) wrote :

Thanks, the sudo apt-get dist-upgrade seems to have solved it. The problem now is cosmetic: I have 6 items under Distribution updates that can't be selected (and won't install when Distribution updates is selected) and won't disappear when re-checking or doing sudo dpkg --configure -a and sudo apt-get install -f. Any ideas on how to get rid of these.

Pixel (thecatwasnot) wrote :

sudo apt-get dist-upgrade seems to have solved it for me as well. Successful update this morning. Thanks guys.

Philipp Kaluza (pixelpapst) wrote :

@evfool: sounds good, thanks. However in another bug I read that the GIR changed the method signature again - we have to recheck the patch.

Sometimes it happens to me, but disappeared after further updates.

2011/9/8 Anders Ekberg <email address hidden>

> Thanks, the sudo apt-get dist-upgrade seems to have solved it. The
> problem now is cosmetic: I have 6 items under Distribution updates that
> can't be selected (and won't install when Distribution updates is
> selected) and won't disappear when re-checking or doing sudo dpkg
> --configure -a and sudo apt-get install -f. Any ideas on how to get rid
> of these.
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (842248).
> https://bugs.launchpad.net/bugs/832745
>
> Title:
> TypeError: glib.markup_escape_text() takes at most 1 argument (2
> given)
>
> To manage notifications about this bug go to:
>
> https://bugs.launchpad.net/ubuntu/+source/update-manager/+bug/832745/+subscriptions
>

tags: added: rls-mgr-o-tracking
Brad Figg (brad-figg) on 2011-09-09
tags: removed: rls-mgr-o-tracking
tags: removed: bugpattern-needed
tags: added: bugpattern-written
Brad Figg (brad-figg) on 2011-09-09
tags: added: rls-mgr-o-tracking
Brian Murray (brian-murray) wrote :

The attachment "debdiff: DistUpgrade/DistUpgradeViewGtk3.py: call glib.markup_escape_text() correctly as per current gir (don't pass in string length; LP: #832745)" of this bug report has been identified as having a patch in the form of a debdiff attached. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-sponsors please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Kenny Strawn (realkstrawn93) wrote :

Workaround for now:

Remove Line 648 of /usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeViewGtk3.py:

--- len (pkg.summary)

Remove everything but the last 3 closing parentheses (and one closing square brace) in that line. The problem is that that particular line is an unneeded argument to a function (the function only accepts one argument and there are two passed to it).

Changed in update-manager (Ubuntu):
status: In Progress → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:0.152.18

---------------
update-manager (1:0.152.18) oneiric; urgency=low

  [ Michael Vogt ]
  * debian/pycompat:
    - removed, no longer needed
  * debian/rules:
    - fix incorrect invocation of --with=python2

  [ Robert Roth ]
  * lp:~evfool/update-manager/handlewarning:
    - Only disconnect handler if it's still connected (LP: #133139)
  * lp:~evfool/update-manager/glibchangefix:
    - Call glib.markup_escape_text() correctly as per current
      gir (don't pass in string length; LP: #832745)
  * lp:~evfool/update-manager/fixcopylink:
    - Fix the "Copy web link" context menu item of the ChangeLog viewer.
      It did not work before of some Gtk changes, now it does work.
      Fixes LP: #831944.

  [ Stefano Rivera ]
  * extras is another special case where validTo=False (LP: #775694)
 -- Michael Vogt <email address hidden> Tue, 13 Sep 2011 11:47:10 +0200

Changed in update-manager (Ubuntu):
status: Fix Committed → Fix Released

Hi, please can you tell me how I can solve this bug! THANKS ALL READY;

Lukasz Olszewski (olszewskil) wrote :

Run the following commands in terminal:
sudo apt-get update
sudo apt-get dist-upgrade

Download full text (4.2 KiB)

Running "sudo apt-get update && sudo apt-get dist-upgrade" without the
quotes from the terminal should be enough to solve this, as it has been
solved in some updates. You have to use the command line for this, as
update-manager crashes because of this bug right now.

Regards,
Robert

On Thu, Sep 22, 2011 at 9:43 PM, Philippe Van Goethem <
<email address hidden>> wrote:

> Hi, please can you tell me how I can solve this bug! THANKS ALL READY;
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/832745
>
> Title:
> TypeError: glib.markup_escape_text() takes at most 1 argument (2
> given)
>
> Status in “update-manager” package in Ubuntu:
> Fix Released
>
> Bug description:
> update-manager crashes after clicking "partial upgrade" (Python
> error).
>
> ** (update-manager:3427): WARNING **: expected enumeration type
> PangoUnderline, but got Underline instead
> ERROR:root:not handled expection:
> Traceback (most recent call last):
>
> File "/usr/bin/update-manager", line 106, in <module>
> controler.doPartialUpgrade()
>
> File
> "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeController.py",
> line 1672, in doPartialUpgrade
> if not self.askDistUpgrade():
>
> File
> "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeController.py",
> line 903, in askDistUpgrade
> self.cache.requiredDownload)
>
> File
> "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeViewGtk3.py", line
> 648, in confirmChanges
> len(pkg.summary)))])
>
> TypeError: glib.markup_escape_text() takes at most 1 argument (2
> given)
>
> Traceback (most recent call last):
> File "/usr/bin/update-manager", line 106, in <module>
> controler.doPartialUpgrade()
> File
> "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeController.py",
> line 1672, in doPartialUpgrade
> if not self.askDistUpgrade():
> File
> "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeController.py",
> line 903, in askDistUpgrade
> self.cache.requiredDownload)
> File
> "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeViewGtk3.py", line
> 648, in confirmChanges
> len(pkg.summary)))])
> TypeError: glib.markup_escape_text() takes at most 1 argument (2 given)
> Error in sys.excepthook:
> Traceback (most recent call last):
> File
> "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeViewGtk3.py", line
> 467, in _handleException
> apport_crash(type, value, tb)
> File
> "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeApport.py", line
> 29, in apport_crash
> report[f.replace(".","").replace("-","")] = (open(f), )
> File "/usr/lib/python2.7/dist-packages/problem_report.py", line 504, in
> __setitem__
> assert k.replace('.', '').replace('-', '').replace('_', '').isalnum()
> AssertionError
>
> Original exception was:
> Traceback (most recent call last):
> File "/usr/bin/update-manager", line 106, in <module>
> controler.doPartialUpgrade()
> File
> "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeController.py",
> line 1672, in doPartialUpgrade
> if not self.askDistUpgrade(...

Read more...

Enrique Merida (cyberquito-h) wrote :

Thank you Lukasz,

regards,

Ing. Enrique Merida
Webmaster, Xemantika
(664) 972-9102

On 09/22/2011 01:12 PM, Lukasz Olszewski wrote:
> Run the following commands in terminal:
> sudo apt-get update
> sudo apt-get dist-upgrade
>

Enrique Merida (cyberquito-h) wrote :
Download full text (4.5 KiB)

Thank's Robert,

It seem to work.

Regards,

Ing. Enrique Merida
Webmaster, Xemantika
(664) 972-9102

On 09/22/2011 01:20 PM, Robert Roth wrote:
> Running "sudo apt-get update&& sudo apt-get dist-upgrade" without the
> quotes from the terminal should be enough to solve this, as it has been
> solved in some updates. You have to use the command line for this, as
> update-manager crashes because of this bug right now.
>
> Regards,
> Robert
>
> On Thu, Sep 22, 2011 at 9:43 PM, Philippe Van Goethem<
> <email address hidden>> wrote:
>
>> Hi, please can you tell me how I can solve this bug! THANKS ALL READY;
>>
>> --
>> You received this bug notification because you are subscribed to the bug
>> report.
>> https://bugs.launchpad.net/bugs/832745
>>
>> Title:
>> TypeError: glib.markup_escape_text() takes at most 1 argument (2
>> given)
>>
>> Status in “update-manager” package in Ubuntu:
>> Fix Released
>>
>> Bug description:
>> update-manager crashes after clicking "partial upgrade" (Python
>> error).
>>
>> ** (update-manager:3427): WARNING **: expected enumeration type
>> PangoUnderline, but got Underline instead
>> ERROR:root:not handled expection:
>> Traceback (most recent call last):
>>
>> File "/usr/bin/update-manager", line 106, in<module>
>> controler.doPartialUpgrade()
>>
>> File
>> "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeController.py",
>> line 1672, in doPartialUpgrade
>> if not self.askDistUpgrade():
>>
>> File
>> "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeController.py",
>> line 903, in askDistUpgrade
>> self.cache.requiredDownload)
>>
>> File
>> "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeViewGtk3.py", line
>> 648, in confirmChanges
>> len(pkg.summary)))])
>>
>> TypeError: glib.markup_escape_text() takes at most 1 argument (2
>> given)
>>
>> Traceback (most recent call last):
>> File "/usr/bin/update-manager", line 106, in<module>
>> controler.doPartialUpgrade()
>> File
>> "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeController.py",
>> line 1672, in doPartialUpgrade
>> if not self.askDistUpgrade():
>> File
>> "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeController.py",
>> line 903, in askDistUpgrade
>> self.cache.requiredDownload)
>> File
>> "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeViewGtk3.py", line
>> 648, in confirmChanges
>> len(pkg.summary)))])
>> TypeError: glib.markup_escape_text() takes at most 1 argument (2 given)
>> Error in sys.excepthook:
>> Traceback (most recent call last):
>> File
>> "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeViewGtk3.py", line
>> 467, in _handleException
>> apport_crash(type, value, tb)
>> File
>> "/usr/lib/python2.7/dist-packages/DistUpgrade/DistUpgradeApport.py", line
>> 29, in apport_crash
>> report[f.replace(".","").replace("-","")] = (open(f), )
>> File "/usr/lib/python2.7/dist-packages/problem_report.py", line 504, in
>> __setitem__
>> assert k.replace('.', '').replace('-', '').replace('_', '').isalnum()
>> AssertionError
>>
>> Original exception was:
>> Tra...

Read more...

Joachim R. (jro) wrote :

This bug is said to be "fix released" but my DistUpgradeViewGtk3.py seems not to be modified as described by the patch and I still have the same error. Cannot upgrade to 12.04.

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

Duplicates of this bug

Other bug subscribers