Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 282274 - Patch: guidance-power-manager 4.3.0 crashes on startup with a TypeError
Summary: Patch: guidance-power-manager 4.3.0 crashes on startup with a TypeError
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo KDE team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-22 08:48 UTC by Søren Færløv
Modified: 2009-11-13 17:51 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
guidance-power-manager-4.3.0-r1.ebuild (guidance-power-manager-4.3.0-r1.ebuild,1.20 KB, patch)
2009-08-22 08:49 UTC, Søren Færløv
Details | Diff
guidance-power-manager-4.3.0-r1-fix-typeerror.patch (guidance-power-manager-4.3.0-r1-fix-typeerror.patch,428 bytes, patch)
2009-08-22 08:49 UTC, Søren Færløv
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Søren Færløv 2009-08-22 08:48:11 UTC
When running guidance-power-manager it crashes with the following traceback:

Traceback (most recent call last):
  File "/usr/bin/guidance-power-manager", line 1178, in <module>
    main()
  File "/usr/bin/guidance-power-manager", line 1153, in main
    mainWindow = PowermanagerApp(None)
  File "/usr/bin/guidance-power-manager", line 1077, in __init__
    self.pmwidget.prepare()
  File "/usr/bin/guidance-power-manager", line 89, in prepare
    self.configToUi()
  File "/usr/bin/guidance-power-manager", line 410, in configToUi
    self._setCB(self.BatteryCriticalCombo, self.cb_act, self.cb_act_def_critical, self._checkOldConfig(self.config.readEntry("batteryCriticalAction", ""), False))
  File "/usr/bin/guidance-power-manager", line 163, in _checkOldConfig
    num_val = int(value)
TypeError: int() argument must be a string or a number, not 'QVariant'
nano /usr/bin/guidance-power-manager
[1]+  Exit 255                guidance-power-manager

I'm not sure what the exact cause is, but I'm using Python-2.6.2. It is however easily fixed, by replacing the offending line, /usr/bin/guidance-power-manager:163
     num_val = int(value)
with
     num_val = value.toInt()

New ebuild and patch included.
Comment 1 Søren Færløv 2009-08-22 08:49:07 UTC
Created attachment 201917 [details, diff]
guidance-power-manager-4.3.0-r1.ebuild
Comment 2 Søren Færløv 2009-08-22 08:49:36 UTC
Created attachment 201918 [details, diff]
guidance-power-manager-4.3.0-r1-fix-typeerror.patch
Comment 3 Tomáš Chvátal (RETIRED) gentoo-dev 2009-08-22 09:36:45 UTC
Just one question, did you send the patch to the upstream guys?
Comment 4 Søren Færløv 2009-08-24 05:56:07 UTC
No, I haven't done that yet. I'd like to make sure, that it's not my own fault, since I haven't checked the good KDE folks recommendation regarding python. I could be using an unsupported version. I would however think, that it would be best if KDE works with as many versions as possible. So perhaps I should just report it regardless.
Comment 5 Søren Færløv 2009-08-24 06:27:29 UTC
Bug reported (with patch attached) upstream (http://bugs.kde.org/show_bug.cgi?id=204938).
Comment 6 Christoph Junghans (RETIRED) gentoo-dev 2009-11-03 19:38:50 UTC
Now, you can use sys-power/guidance-power-manager-4.3.1 from kde-testing overlay.

As kde-4.3.1 is stable now, I think it makes sense to move this ebuild to the tree.

Comment 7 Samuli Suominen (RETIRED) gentoo-dev 2009-11-13 17:51:40 UTC
4.3.3 in portage, closing.