Bug#900858: Coding error - trying to concat str and list, when reading radeon_powersave options

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug#900858: Coding error - trying to concat str and list, when reading radeon_powersave options

Witold Baryluk-2
Package: tuned-gtk
Version: 2.9.0-1
Severity: important

Hi,

on first try tuned-gtk failed on me. At line 500 it tries to concat string and list.

Adding some basic instrumentation around line 500,

# /usr/sbin/tuned-gui
<class 'collections.OrderedDict'>
governor
<type 'str'>
conservative
<type 'str'>
energy_perf_bias
<type 'str'>
normal
<type 'str'>
<class 'collections.OrderedDict'>
timeout
<type 'str'>
10
<type 'str'>
<class 'collections.OrderedDict'>
radeon_powersave   # key
<type 'str'>
['dpm-balanced', 'auto']  # value
<type 'list'>
Traceback (most recent call last):
  File "/usr/sbin/tuned-gui", line 1037, in <module>
    base = Base()
  File "/usr/sbin/tuned-gui", line 325, in __init__
    self.data_for_listbox_summary_of_active_profile()
  File "/usr/sbin/tuned-gui", line 505, in data_for_listbox_summary_of_active_profile
    + '</b>')
TypeError: cannot concatenate 'str' and 'list' objects
#


The main culprit was lack of str(o), it was just o, and because options
is a list in some cases.


-- System Information:
Debian Release: buster/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.16.0-1-amd64 (SMP w/12 CPU cores)
Locale: LANG=pl_PL.utf8, LC_CTYPE=pl_PL.utf8 (charmap=UTF-8), LANGUAGE=pl_PL.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages tuned-gtk depends on:
ii  gir1.2-gtk-3.0  3.22.30-1
ii  powertop        2.8-1+b2
ii  python          2.7.15~rc1-1
ii  python-gi       3.28.2-1
ii  tuned           2.9.0-1

tuned-gtk recommends no packages.

tuned-gtk suggests no packages.

-- no debconf information

Reply | Threaded
Open this post in threaded view
|

Bug#900858: Coding error - trying to concat str and list, when reading radeon_powersave options

Evgeni Golov-2
Hi,

upstream suggests this is probably fixed by https://github.com/redhat-performance/tuned/commit/c37b6220d4bca5984c7c855317d0af31ebe0ec73 which is part of the 2.10 release I have uploaded earlier today.

Can you please retest this?

Thanks
Evgeni

On 6 June 2018 02:07:27 CEST, Witold Baryluk <[hidden email]> wrote:

>Package: tuned-gtk
>Version: 2.9.0-1
>Severity: important
>
>Hi,
>
>on first try tuned-gtk failed on me. At line 500 it tries to concat
>string and list.
>
>Adding some basic instrumentation around line 500,
>
># /usr/sbin/tuned-gui
><class 'collections.OrderedDict'>
>governor
><type 'str'>
>conservative
><type 'str'>
>energy_perf_bias
><type 'str'>
>normal
><type 'str'>
><class 'collections.OrderedDict'>
>timeout
><type 'str'>
>10
><type 'str'>
><class 'collections.OrderedDict'>
>radeon_powersave   # key
><type 'str'>
>['dpm-balanced', 'auto']  # value
><type 'list'>
>Traceback (most recent call last):
>  File "/usr/sbin/tuned-gui", line 1037, in <module>
>    base = Base()
>  File "/usr/sbin/tuned-gui", line 325, in __init__
>    self.data_for_listbox_summary_of_active_profile()
>File "/usr/sbin/tuned-gui", line 505, in
>data_for_listbox_summary_of_active_profile
>    + '</b>')
>TypeError: cannot concatenate 'str' and 'list' objects
>#
>
>
>The main culprit was lack of str(o), it was just o, and because options
>is a list in some cases.
>
>
>-- System Information:
>Debian Release: buster/sid
>  APT prefers unstable
>  APT policy: (500, 'unstable'), (1, 'experimental')
>Architecture: amd64 (x86_64)
>Foreign Architectures: i386
>
>Kernel: Linux 4.16.0-1-amd64 (SMP w/12 CPU cores)
>Locale: LANG=pl_PL.utf8, LC_CTYPE=pl_PL.utf8 (charmap=UTF-8),
>LANGUAGE=pl_PL.utf8 (charmap=UTF-8)
>Shell: /bin/sh linked to /bin/dash
>Init: systemd (via /run/systemd/system)
>LSM: AppArmor: enabled
>
>Versions of packages tuned-gtk depends on:
>ii  gir1.2-gtk-3.0  3.22.30-1
>ii  powertop        2.8-1+b2
>ii  python          2.7.15~rc1-1
>ii  python-gi       3.28.2-1
>ii  tuned           2.9.0-1
>
>tuned-gtk recommends no packages.
>
>tuned-gtk suggests no packages.
>
>-- no debconf information