wxPython Menubar Error

Post here if you need help with creating a Graphical User Interface in Python.

wxPython Menubar Error

Postby Crimson King » Sat May 18, 2013 10:25 pm

Hello, i just started reading a wxPython tutorial and got an error when i tried to add a menubar and some menuitems.

I run the script and the menubar doesn't appear, only the maximize button, etc. When i close the window it prompts this error message:

(python:2858): LIBDBUSMENU-GLIB-WARNING **: Trying to remove a child that doesn't believe we're it's parent.

Funny thing is, when i run it as sudo it works just fine. I read in a forum that this has something to do with Unity's "Global Menu" but didn't find out much about it and i'm not that familiar with linux to be messing around with configuration files yet.

Anyone got this problem and figured out how to solve it?

I'm running Ubuntu 12.10, Python 2.7.3 and wxPython 2.8.12.1

Thanks!
User avatar
Crimson King
 
Posts: 131
Joined: Fri Mar 08, 2013 2:42 pm
Location: Buenos Aires, Argentina

Re: wxPython Menubar Error

Postby Yoriz » Sat May 18, 2013 10:44 pm

See the wxpython code in this post http://www.python-forum.org/viewtopic.php?f=12&t=516 it has a menu bar, does it run ok for you ?
New Users, Read This
Join the #python-forum IRC channel on irc.freenode.net!
Image
User avatar
Yoriz
 
Posts: 1018
Joined: Fri Feb 08, 2013 1:35 am
Location: UK

Re: wxPython Menubar Error

Postby Crimson King » Sun May 19, 2013 12:13 am

Hi Yoriz thanks for the quick reply.

Unfortunately i got the same error message i posted earlier.
User avatar
Crimson King
 
Posts: 131
Joined: Fri Mar 08, 2013 2:42 pm
Location: Buenos Aires, Argentina

Re: wxPython Menubar Error

Postby Yoriz » Sun May 19, 2013 12:20 am

Sorry then i cant help as im on windows and it works ok, you could try asking on https://groups.google.com/forum/?fromgroups#!forum/wxpython-users or irc #wxpython on freenode.
New Users, Read This
Join the #python-forum IRC channel on irc.freenode.net!
Image
User avatar
Yoriz
 
Posts: 1018
Joined: Fri Feb 08, 2013 1:35 am
Location: UK

Re: wxPython Menubar Error

Postby octopez » Sun May 19, 2013 9:39 pm

I did a quick search (as I'm running Windows as well) and found this: http://ubuntuforums.org/showthread.php?t=1632239
Maybe this helps?
Greetings and all the best,
Octopez

Strange women lying in ponds distributing swords is no basis for a system of government.
User avatar
octopez
 
Posts: 25
Joined: Fri Feb 08, 2013 11:26 pm

Re: wxPython Menubar Error

Postby Crimson King » Tue May 21, 2013 1:18 am

Hey octopez that link put me in the right track, thanks a lot.

This is what i did to solve this issue:

Go to you home folder, press CTRL + H (this shows hidden files), open the '.bashrc' file and add this line 'export UBUNTU_MENUPROXY=0'.

Btw Yoriz, thanks for posting the links to the wxpython user group and their irc channel. Although i didn't use them this time, they might come in handy in the near future.
User avatar
Crimson King
 
Posts: 131
Joined: Fri Mar 08, 2013 2:42 pm
Location: Buenos Aires, Argentina


Return to GUI

Who is online

Users browsing this forum: No registered users and 1 guest