KeyError in on_menuitem_toggled()

Bug #854648 reported by Nick Dyatlov on 2011-09-20
56
This bug affects 9 people
Affects Status Importance Assigned to Milestone
Deluge
Fix Released
Unknown
deluge (Ubuntu)
Medium
Unassigned

Bug Description

The error occurs after the deluge

ProblemType: Crash
DistroRelease: Ubuntu 11.10
Package: deluge-gtk 1.3.3-1ubuntu1
ProcVersionSignature: Ubuntu 3.0.0-11.18-generic 3.0.4
Uname: Linux 3.0.0-11-generic i686
ApportVersion: 1.23-0ubuntu1
Architecture: i386
Date: Tue Sep 20 14:44:51 2011
ExecutablePath: /usr/bin/deluge-gtk
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Beta i386 (20110901)
InterpreterPath: /usr/bin/python2.7
PackageArchitecture: all
ProcCmdline: /usr/bin/python /usr/bin/deluge-gtk
PythonArgs: ['/usr/bin/deluge-gtk']
SourcePackage: deluge
Title: deluge-gtk crashed with KeyError in on_menuitem_toggled(): '\xd0\x97\xd0\xb0\xd0\xb3\xd1\x80\xd1\x83\xd0\xb6\xd0\xb5\xd0\xbd\xd0\xbe'
Traceback:
 Traceback (most recent call last):
   File "/usr/lib/python2.7/dist-packages/deluge/ui/gtkui/listview.py", line 339, in on_menuitem_toggled
     self.columns[name].column.set_visible(widget.get_active())
 KeyError: '\xd0\x97\xd0\xb0\xd0\xb3\xd1\x80\xd1\x83\xd0\xb6\xd0\xb5\xd0\xbd\xd0\xbe'
UpgradeStatus: Upgraded to oneiric on 2011-09-13 (6 days ago)
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Nick Dyatlov (nick-dyatlov) wrote :
tags: removed: need-duplicate-check
Cas (calumlind) wrote :

Could you provide some more information on how this occurred and is it repeatable?

visibility: private → public
Cas (calumlind) wrote :

For reference the KeyError decodes to 'Загружено' which is 'Downloaded' in English.

summary: - deluge-gtk crashed with KeyError in on_menuitem_toggled():
- '\xd0\x97\xd0\xb0\xd0\xb3\xd1\x80\xd1\x83\xd0\xb6\xd0\xb5\xd0\xbd\xd0\xbe'
+ KeyError in on_menuitem_toggled()
Launchpad Janitor (janitor) wrote :

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

Changed in deluge (Ubuntu):
status: New → Confirmed
Serge Matveenko (lig) wrote :

This patch fixes the problem in torrent list view.

tags: added: patch
Cas (calumlind) wrote :

That is more a workaround than an ideal fix.

Unfortunately with my testing I cannot replicate this. However looking at the code it is clear that the column header, a translatable string, is being used as a key which is not ideal . The easiest solution I think would be to use deferred translations for those strings in torrentview.py.

Serge Matveenko (lig) wrote :

Fair enough, Cas. I just did something to be able to use this awesome software. As for me the best solution is to use unique keys for colums and attach these keys as data to menu items. I such case you do not need to modify translating mechanics.

Cas (calumlind) on 2011-10-27
Changed in deluge (Ubuntu):
importance: Undecided → High
importance: High → Medium
Changed in deluge:
status: Unknown → New

The attachment "0001-Fix-crash-on-non-latin-1-named-column-active-state-c.patch.gz" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. 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.]

Cas (calumlind) on 2011-12-03
Changed in deluge (Ubuntu):
status: Confirmed → Fix Committed
Changed in deluge:
status: New → Confirmed
Cas (calumlind) on 2012-04-10
Changed in deluge (Ubuntu):
status: Fix Committed → Fix Released
Changed in deluge:
status: Confirmed → Fix Released
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

Remote bug watches

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