Unable to generate preview from existing .wxg with menu

D Haley <[email protected]>
Newsgroups gmane.comp.python.wxglade
Message-ID <[email protected]>
Dear Wxglade list,

I am getting an error when attmpting to generate menu items, which 
prompts me to warn on the error (bottom of email). Im using 0.7.1~rc1-3 
from the debian testing repositories. Has anyone reported this?

The error is below (I've redacted a couple of the user-strings). This 
worked previously in debian's wxglade 0.6.8-2.2. I generated the .wxg 
file using 0.6.8 originally, and am re-opening it. I can't seem to 
repeat the bug if I simply make a new menu from scratch.

I can provide the .wxg file privately if this helps.

Thanks!


ERROR   : An internal error occurred while Generate Preview
An unexpected error occurred!

Date and time:       2015-11-09T00:11:51.098292
Python version:      2.7.9
wxPython version:    3.0.2.0
wxWidgets platform:  __WXGTK__
wxGlade version:     0.7.0
Language code:       en_GB
Encoding:            UTF-8
Filesystem encoding: UTF-8

Exception type:      <type 'exceptions.AttributeError'>
Exception details:   'MenuItem' object has no attribute 'AppendItem'
Application stack trace:
Stack frame at level 0
======================
   File "/tmp/wxgg7VdrS.py", line 30
   Function "__init__(self=<wxgg7VdrS._397712365_MainGui; proxy of <Swig 
Object of type 'wxFrame *' at 0x391e6e0> >, *args=(None, -1, ''), 
**kwds={'style': 541072960})"
   Source code context:
       		self.cellGuiMenu.Append(self.Main, "&Main")
       		self.someMenu = wx.Menu()
       		self.someMenu = wx.MenuItem(self.someMenu wx.NewId(), 
"&MyOtherMenu", "Show the MyOtherMenu", wx.ITEM_NORMAL)
   ->  		self.someMenu.AppendItem(self.someMenu)
       		self.someMenu.Append(wx.NewId(), "&MyMenu", "Show the MyMenu 
controls", wx.ITEM_NORMAL)
       		self.cellGuiMenu.Append(self.someMenu, "&Equipment")
       		wxglade_tmp_menu = wx.Menu()
   Local variables:
   -> self (<class 'wxgg7VdrS._397712365_MainGui'>): 
<wxgg7VdrS._397712365_MainGui; proxy of <Swig Object of type 'wxFrame *' 
at 0x391e6e0> >
   -> args (<type 'tuple'>): (None, -1, '')
   -> kwds (<type 'dict'>): {'style': 541072960}

Stack frame at level 1
======================
   File 
"/usr/lib/python2.7/dist-packages/wxGlade-0.7.0-py2.7.egg/wxglade/application.py", 
line 857
   Function "preview(self=<application.Application object at 
0x7f9d9402e550>, widget=<frame.frame.EditFrame object at 
0x7f9d9142d690>, out_name='/tmp/wxgg7VdrS.py')"
   Source code context:
                           panel = preview_class(frame, -1)
                       frame.Fit()
                   else:
   ->                  frame = preview_class(None, -1, '')

                   def on_close(event):
                       frame.Destroy()
   Local variables:
   -> preview_path (<type 'str'>): '/tmp'
   -> widget_class_name (<type 'unicode'>): u'MainGui'
   -> warnings (<type 'module'>): <module 'warnings' from 
'/usr/lib/python2.7/warnings.pyc'>
   -> real_language (<type 'unicode'>): u'C++'
   -> widget (<class 'frame.frame.EditFrame'>): <frame.frame.EditFrame 
object at 0x7f9d9142d690>
   -> self (<class 'application.Application'>): <application.Application 
object at 0x7f9d9402e550>
   -> preview_module (<type 'module'>): <module 'wxgg7VdrS' from 
'/tmp/wxgg7VdrS.py'>
   -> preview_module_name (<type 'str'>): 'wxgg7VdrS'
   -> real_multiple_files (<type 'bool'>): True
   -> preview_class (<type 'type'>): <class 'wxgg7VdrS._397712365_MainGui'>
   -> out_name (<type 'str'>): '/tmp/wxgg7VdrS.py'
   -> real_use_gettext (<type 'bool'>): True
   -> inst (<type 'exceptions.AttributeError'>): 
AttributeError("'MenuItem' object has no attribute 'AppendItem'",)
   -> frame (<type 'NoneType'>): None
   -> overwrite (<type 'bool'>): True


------------------------------------------------------------------------------
Presto, an open source distributed SQL query engine for big data, initially
developed by Facebook, enables you to easily query your data on Hadoop in a 
more interactive manner. Teradata is also now providing full enterprise
support for Presto. Download a free open source copy now.
http://pubads.g.doubleclick.net/gampad/clk?id=250295911&iu=/4140
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.