This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 1290905 - [abrt] obmenu: minidom.py:522:__getitem__:KeyError: 'name'
[abrt] obmenu: minidom.py:522:__getitem__:KeyError: 'name'
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: obmenu (Show other bugs)
23
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Lichvar
Fedora Extras Quality Assurance
https://retrace.fedoraproject.org/faf...
abrt_hash:5234d1d841838b78a538242bea1...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-12-11 15:52 EST by mastaiza
Modified: 2016-11-24 09:44 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-24 09:44:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (803 bytes, text/plain)
2015-12-11 15:52 EST, mastaiza
no flags Details
File: environ (1.28 KB, text/plain)
2015-12-11 15:52 EST, mastaiza
no flags Details

  None (edit)
Description mastaiza 2015-12-11 15:52:27 EST
Version-Release number of selected component:
obmenu-1.0-18.fc23

Additional info:
reporter:       libreport-2.6.3
cmdline:        /usr/bin/python /bin/obmenu
dso_list:       python-libs-2.7.10-8.fc23.x86_64
executable:     /bin/obmenu
kernel:         4.2.6-301.fc23.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
minidom.py:522:__getitem__:KeyError: 'name'

Traceback (most recent call last):
  File "/bin/obmenu", line 614, in <module>
    app.init()
  File "/bin/obmenu", line 607, in init
    self.createTree(None, None)
  File "/bin/obmenu", line 41, in createTree
    if self.menu.getMenu(it["id"]) and it["action"] == "":
  File "/usr/lib/python2.7/site-packages/obxml.py", line 340, in getMenu
    d = self._get_item_props(i)
  File "/usr/lib/python2.7/site-packages/obxml.py", line 117, in _get_item_props
    accion = it.attributes["name"].nodeValue
  File "/usr/lib64/python2.7/xml/dom/minidom.py", line 522, in __getitem__
    return self._attrs[attname_or_tuple]
KeyError: 'name'

Local variables in innermost frame:
self: <xml.dom.minidom.NamedNodeMap object at 0x7fef00a98f80>
attname_or_tuple: 'name'
Comment 1 mastaiza 2015-12-11 15:52:31 EST
Created attachment 1104832 [details]
File: backtrace
Comment 2 mastaiza 2015-12-11 15:52:33 EST
Created attachment 1104834 [details]
File: environ
Comment 3 wjhendrickson 2015-12-18 07:43:03 EST
I experience the exact same error on Fedora 22/x86_64 (obmenu-1.0-17/python -2.7.10-8).

I found that my custom menu.xml file (in ~/.config/openbox/) was triggering the problem.  To test, I removed it and obmenu read /etc/xdg/openbox/menu.xml and worked as expected.  My custom menu.xml file had a key inside <item> that should not have been there. 

Basically, I had this syntax, which caused the error:

<item label="firefox">
  <action name="Execute"><command>firefox</command></action>
  <comment>Run Firefox</comment>  
</item>

When I moved the comment key to be nested in action, all was well:

<item label="firefox">
  <action name="Execute">
    <command>firefox</command>
    <comment>Run Firefox</comment>    
  </action>
</item>

This page helped me:

http://openbox.org/wiki/Help:Actions#Action_syntax

My comment key is being ignored, I think - I am not sure it is valid...but that is beside the point.

At any rate, it would be nice if obmenu was more clear about the syntax error, or could at least tell the user that it failed to parse the XML file, and supplied the file name.
Comment 4 Fedora End Of Life 2016-11-24 09:10:45 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Note You need to log in before you can comment on or make changes to this bug.