Description of problem: This happened while using powertop2tuned, to write a custom tuned policy based on powertop. Powertop 2.6.1, Fedora 21 alpha 0 (branched). Version-Release number of selected component: tuned-utils-2.3.0-4.fc21 Additional info: reporter: libreport-2.2.3 cmdline: /usr/bin/python -Es /bin/powertop2tuned -e battery dso_list: python-libs-2.7.8-3.fc21.x86_64 executable: /bin/powertop2tuned kernel: 3.16.0-1.fc21.x86_64 runlevel: N 5 type: Python uid: 0 Truncated backtrace: powertop2tuned:86:handle_starttag:KeyError: 'id' Traceback (most recent call last): File "/bin/powertop2tuned", line 321, in <module> sys.exit(p.generate(args['new_profile'], args['merge_profile'], args['enable'])) File "/bin/powertop2tuned", line 263, in generate data, plugins = self.parseHTML(enable_tunings) File "/bin/powertop2tuned", line 224, in parseHTML parser.feed(data) File "/usr/lib64/python2.7/HTMLParser.py", line 117, in feed self.goahead(0) File "/usr/lib64/python2.7/HTMLParser.py", line 161, in goahead k = self.parse_starttag(i) File "/usr/lib64/python2.7/HTMLParser.py", line 327, in parse_starttag self.handle_starttag(tag, attrs) File "/bin/powertop2tuned", line 86, in handle_starttag if self.lastStartTag == "div" and dict(attrs)["id"] == "tuning": KeyError: 'id' Local variables in innermost frame: self: <__main__.PowertopHTMLParser instance at 0x7f2104e30ea8> tag: u'div' attrs: [(u'class', u'sys_info')]
Created attachment 926536 [details] File: backtrace
Created attachment 926537 [details] File: environ
Another user experienced a similar problem: I was trying to run the powertop2tuned script, like I do after any reinstall. But it failed. reporter: libreport-2.2.3 cmdline: /usr/bin/python -Es /usr/bin/powertop2tuned -m powersave -o monprofil dso_list: python-libs-2.7.8-4.1.fc21.x86_64 executable: /usr/bin/powertop2tuned kernel: 3.16.1-301.fc21.x86_64 package: tuned-utils-2.4.0-1.fc21 reason: powertop2tuned:86:handle_starttag:KeyError: 'id' runlevel: N 5 type: Python uid: 0
Created attachment 971644 [details] patch to fix KeyError on id attribute This patched fixes the KeyError when running the powertop2tuned script. According to https://wiki.python.org/moin/KeyError the get method does not throw an error but instead returns a default value. The script continues to run as expected after applying this patch.
(In reply to Michael Mansell from comment #4) > Created attachment 971644 [details] > patch to fix KeyError on id attribute > Thanks, applied upstream: https://git.fedorahosted.org/cgit/tuned.git/commit/?id=4a0a965f6507b5a626bf19b5c235097cadd8d0e5
tuned-2.4.1-3.fc21 has been submitted as an update for Fedora 21. https://admin.fedoraproject.org/updates/tuned-2.4.1-3.fc21
tuned-2.4.1-3.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/tuned-2.4.1-3.fc20
Another user experienced a similar problem: I attempted to create a new tuned profie using power2tuned. I tried to commands sudo powertop2tuned ptop and sudo powertop2tuned -n ptop both gave the following: reporter: libreport-2.3.0 cmdline: /usr/bin/python -Es /bin/powertop2tuned ptop dso_list: python-libs-2.7.8-7.fc21.x86_64 executable: /bin/powertop2tuned kernel: 3.17.7-300.fc21.x86_64 package: tuned-utils-2.4.1-1.fc21 reason: powertop2tuned:86:handle_starttag:KeyError: 'id' runlevel: N 5 type: Python uid: 0
Package tuned-2.4.1-3.fc21: * should fix your issue, * was pushed to the Fedora 21 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing tuned-2.4.1-3.fc21' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2015-0481/tuned-2.4.1-3.fc21 then log in and leave karma (feedback).
I can confirm the update tuned-2.4.1-3.fc2 and tuned-utils-2.4.1-3.fc21 works.
(In reply to Moses from comment #10) > I can confirm the update tuned-2.4.1-3.fc2 and tuned-utils-2.4.1-3.fc21 > works. Ok, thanks for info, please give it positive karma, if you can.
tuned-2.4.1-3.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.
tuned-2.4.1-3.fc21 has been pushed to the Fedora 21 stable repository. If problems still persist, please make note of it in this bug report.