Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fvwm-menu-desktop fails if used with --get-menus #234

Closed
lgsobalvarro opened this issue Sep 23, 2020 · 8 comments
Closed

Fvwm-menu-desktop fails if used with --get-menus #234

lgsobalvarro opened this issue Sep 23, 2020 · 8 comments
Labels
difficulty:gfi Issue is suitable for a first-time contributor/developer help wanted Development help required (see `difficulty:*`) type:bug Something's broken!

Comments

@lgsobalvarro
Copy link
Contributor

If I run
fvwm-menu-desktop --get-menus all

Or

fvwm-menu-desktop --get-menus desktop

I get the following:

Traceback (most recent call last):
  File "/usr/local/bin/fvwm-menu-desktop", line 889, in <module>
    main()
  File "/usr/local/bin/fvwm-menu-desktop", line 470, in main
    parsemenus(menulist, desktop, desktop_entries)
  File "/usr/local/bin/fvwm-menu-desktop", line 746, in parsemenus
    parsemenu(xdg.Menu.parse(menu), name, title, desktop_subentries)
  File "/usr/lib/python3.8/site-packages/xdg/Menu.py", line 1128, in parse
    return XMLMenuBuilder(debug).parse(filename)
  File "/usr/lib/python3.8/site-packages/xdg/Menu.py", line 632, in parse
    menu = self.parse_menu(tree.getroot(), filename)
  File "/usr/lib/python3.8/site-packages/xdg/Menu.py", line 650, in parse_menu
    self.parse_node(node, filename, menu)
  File "/usr/lib/python3.8/site-packages/xdg/Menu.py", line 659, in parse_node
    menu = self.parse_menu(child, filename)
  File "/usr/lib/python3.8/site-packages/xdg/Menu.py", line 650, in parse_menu
    self.parse_node(node, filename, menu)
  File "/usr/lib/python3.8/site-packages/xdg/Menu.py", line 682, in parse_node
    parent.Rules.append(self.parse_rule(child))
  File "/usr/lib/python3.8/site-packages/xdg/Menu.py", line 759, in parse_rule
    return Rule(type, tree)
  File "/usr/lib/python3.8/site-packages/xdg/Menu.py", line 421, in __init__
    self.code = compile(self.expression, '<compiled-menu-rule>', 'eval')
ValueError: Name node can't be used with 'True' constant

This issue seems to affect FVWM2 as well.

@issue-label-bot issue-label-bot bot added the type:bug Something's broken! label Sep 23, 2020
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.98. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@ThomasAdam
Copy link
Member

Hi @lgsobalvarro,

I seem to recall a brief conversation about this on IRC, with @somiaj? @somiaj -- is this an actual problem we need to solve, do you know?

@somiaj
Copy link
Collaborator

somiaj commented Oct 15, 2020

My only comment was 'it works for me', and I didn't have time to look at why python is not liking it. Since I'm using python 3.7, unsure if there is some change in python 3.8, or something on lgsobalvarro's system causing this ValueError.

@ThomasAdam
Copy link
Member

Okey dokey. @lgsobalvarro, which python version are you using which shows this error?

@lgsobalvarro
Copy link
Contributor Author

lgsobalvarro commented Oct 15, 2020

Python 3.8.5
I also have on my system 2.7.18

@ThomasAdam
Copy link
Member

Hi @lgsobalvarro

Is this issue still a problem?

@lgsobalvarro
Copy link
Contributor Author

Yes. The problem continues with the exact same error when I run fvwm-menu-desktop --get-menus all

Tested with Fvwm3 1.0.1 (1.0.0-42-g264eaf1e)

@ThomasAdam ThomasAdam added difficulty:gfi Issue is suitable for a first-time contributor/developer help wanted Development help required (see `difficulty:*`) labels Dec 20, 2020
@lgsobalvarro
Copy link
Contributor Author

This seems to work now fine.
I didn't touch anything on my config.
Seems like it had something to do with the way python was being packaged or something. Looks like the most recent python update changed this.

Seems @somiaj was in the right track.

I'm closing this issue then :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:gfi Issue is suitable for a first-time contributor/developer help wanted Development help required (see `difficulty:*`) type:bug Something's broken!
Projects
None yet
Development

No branches or pull requests

3 participants