Bug 1624651

Summary: [abrt] openbox: sort(): Menu.py:301:sort:AttributeError: 'DesktopEntry' object has no attribute 'OnlyShowIn'
Product: [Fedora] Fedora Reporter: Paul DeStefano <prd-fedora>
Component: pyxdgAssignee: Tom "spot" Callaway <tcallawa>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 29CC: abrahm.scully, christoph.wickert, hallaj, mlichvar, neumannfran, nixuser, sindrepb, splinux25, tcallawa, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
URL: https://retrace.fedoraproject.org/faf/reports/bthash/cfe1ebc0596d40b30a3a898632d48dbdce1a9c2a
Whiteboard: abrt_hash:bdac79da3bd7b3b36a8830b7d6e8e9abae0a52a2;
Fixed In Version: pyxdg-0.26-2.fc29 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-07 02:40:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
File: backtrace
none
File: cgroup
none
File: cpuinfo
none
File: environ
none
File: mountinfo
none
File: namespaces
none
File: open_fds none

Description Paul DeStefano 2018-09-02 21:31:25 UTC
Version-Release number of selected component:
openbox-3.6.1-10.fc29

Additional info:
reporter:       libreport-2.9.5
cmdline:        /usr/bin/python3 /usr/libexec/openbox-xdg-menu applications
crash_function: sort
exception_type: AttributeError
executable:     /usr/libexec/openbox-xdg-menu
interpreter:    python3-3.7.0-9.fc29.x86_64
kernel:         4.18.5-300.fc29.x86_64
runlevel:       N 5
type:           Python3
uid:            1000

Truncated backtrace:
Menu.py:301:sort:AttributeError: 'DesktopEntry' object has no attribute 'OnlyShowIn'

Traceback (most recent call last):
  File "/usr/libexec/openbox-xdg-menu", line 103, in <module>
    menu = xdg.Menu.parse(menufile)
  File "/usr/lib/python3.7/site-packages/xdg/Menu.py", line 1128, in parse
    return XMLMenuBuilder(debug).parse(filename)
  File "/usr/lib/python3.7/site-packages/xdg/Menu.py", line 644, in parse
    menu.sort()
  File "/usr/lib/python3.7/site-packages/xdg/Menu.py", line 232, in sort
    submenu.sort()
  File "/usr/lib/python3.7/site-packages/xdg/Menu.py", line 301, in sort
    if (entry.DesktopEntry.OnlyShowIn != [] and (
AttributeError: 'DesktopEntry' object has no attribute 'OnlyShowIn'

Local variables in innermost frame:
self: <xdg.Menu.Menu object at 0x7ff74a143d68>
_submenus: set()
_entries: set()
order: ['Merge', 'files']
menuentry: xfburn.desktop
entry: xfce4-about.desktop

Comment 1 Paul DeStefano 2018-09-02 21:31:29 UTC
Created attachment 1480386 [details]
File: backtrace

Comment 2 Paul DeStefano 2018-09-02 21:31:30 UTC
Created attachment 1480387 [details]
File: cgroup

Comment 3 Paul DeStefano 2018-09-02 21:31:31 UTC
Created attachment 1480388 [details]
File: cpuinfo

Comment 4 Paul DeStefano 2018-09-02 21:31:32 UTC
Created attachment 1480389 [details]
File: environ

Comment 5 Paul DeStefano 2018-09-02 21:31:34 UTC
Created attachment 1480390 [details]
File: mountinfo

Comment 6 Paul DeStefano 2018-09-02 21:31:35 UTC
Created attachment 1480391 [details]
File: namespaces

Comment 7 Paul DeStefano 2018-09-02 21:31:36 UTC
Created attachment 1480392 [details]
File: open_fds

Comment 8 Miroslav Lichvar 2018-09-12 11:45:55 UTC
From the backtrace it looks like it might be a pyxdg issue.

Comment 9 Miroslav Lichvar 2018-10-01 07:38:53 UTC
*** Bug 1634269 has been marked as a duplicate of this bug. ***

Comment 10 Abrahm Scully 2018-10-24 01:08:51 UTC
Downgrading to python3-pyxdg-0.25-16.fc29.noarch resolves this problem for me.

Comment 11 Tomas Lestach 2018-11-01 15:02:48 UTC
I have the same problem in Fedora 29 XFCE + openbox:

# /usr/libexec/openbox-xdg-menu /etc/xdg/openbox/terminals
Traceback (most recent call last):
  File "/usr/libexec/openbox-xdg-menu", line 103, in <module>
    menu = xdg.Menu.parse(menufile)
  File "/usr/lib/python3.7/site-packages/xdg/Menu.py", line 1128, in parse
    return XMLMenuBuilder(debug).parse(filename)
  File "/usr/lib/python3.7/site-packages/xdg/Menu.py", line 644, in parse
    menu.sort()
  File "/usr/lib/python3.7/site-packages/xdg/Menu.py", line 301, in sort
    if (entry.DesktopEntry.OnlyShowIn != [] and (
AttributeError: 'DesktopEntry' object has no attribute 'OnlyShowIn'

Comment 12 Tomas Lestach 2018-11-01 15:06:16 UTC
Ack, downgrade to python3-pyxdg-0.25-16.fc29.noarch resolves the issue:

# /usr/libexec/openbox-xdg-menu /etc/xdg/openbox/terminals
<?xml version="1.0" encoding="UTF-8"?>
<openbox_pipe_menu>
	<item label="Xfce Terminal" icon="/usr/share/icons/gnome/22x22/apps/utilities-terminal.png">
		<action name="Execute"><command>xfce4-terminal</command></action>
	</item>
</openbox_pipe_menu>

Comment 13 Fedora Update System 2018-11-01 16:48:04 UTC
pyxdg-0.26-2.fc29 has been submitted as an update to Fedora 29. https://bodhi.fedoraproject.org/updates/FEDORA-2018-e3ab92c68d

Comment 14 Miroslav Lichvar 2018-11-01 16:53:57 UTC
*** Bug 1644945 has been marked as a duplicate of this bug. ***

Comment 15 Miroslav Lichvar 2018-11-01 16:53:58 UTC
*** Bug 1624654 has been marked as a duplicate of this bug. ***

Comment 16 Ian Laurie 2018-11-02 03:55:10 UTC
python3-pyxdg-0.26-2.fc29.noarch.rpm fixes the problem for me.  Direct link:

https://kojipkgs.fedoraproject.org//packages/pyxdg/0.26/2.fc29/noarch/python3-pyxdg-0.26-2.fc29.noarch.rpm

Comment 17 Fedora Update System 2018-11-03 00:54:32 UTC
pyxdg-0.26-2.fc29 has been pushed to the Fedora 29 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-e3ab92c68d

Comment 18 Fedora Update System 2018-11-07 02:40:31 UTC
pyxdg-0.26-2.fc29 has been pushed to the Fedora 29 stable repository. If problems still persist, please make note of it in this bug report.