any idea what this error is about?

Thomas Layer <thomas.layer-zJpx2rpV7r/[email protected]>
Newsgroups gmane.comp.python.wxglade,gmane.spam.detected
Message-ID <[email protected]>
ERROR : An internal error occurred while generating code
An unexpected error occurred!

Date and time: 2016-02-06T14:19:06.704222
Python version: 2.7.9
wxPython version: 3.0.1.1
wxWidgets platform: __WXGTK__
wxGlade version: 0.7.0
Language code: en_US
Encoding: UTF-8
Filesystem encoding: UTF-8

Exception type: <type 'exceptions.AssertionError'>
Exception details:
Application stack trace:
Stack frame at level 0
======================
File "/usr/lib/python2.7/dist-packages/wxglade/wcodegen/__init__.py", line 755
Function "get_layout_code(self=<menubar.codegen.PythonMenubarGenerator object at 0x7f7a26dfe350>, obj=<xml_parse.CodeObject object at 0x7f7a1dddacd0>)"
Source code context:
@see: L{tmpl_props}
@rtype: list[str]
"""
-> assert self.tmpl_layout
layout_lines = []
self._reset_vars()

Local variables:
-> self (<class 'menubar.codegen.PythonMenubarGenerator'>): <menubar.codegen.PythonMenubarGenerator object at 0x7f7a26dfe350>
-> obj (<class 'xml_parse.CodeObject'>): <xml_parse.CodeObject object at 0x7f7a1dddacd0>

Stack frame at level 1
======================
File "/usr/lib/python2.7/dist-packages/wxglade/codegen/__init__.py", line 1843
Function "generate_code_do_layout(self=<py_codegen.PythonCodeWriter object at 0x7f7a271ef1d0>, builder=<menubar.codegen.PythonMenubarGenerator object at 0x7f7a26dfe350>, code_obj=<xml_parse.CodeObject object at 0x7f7a1dddacd0>, is_new=True, tab='\t\t\t\t\t\t\t\t')"
Source code context:

# check if there are extra layout lines to add
if hasattr(builder, 'get_layout_code'):
-> extra_layout_lines = builder.get_layout_code(code_obj)
else:
extra_layout_lines = []

Local variables:
-> builder (<class 'menubar.codegen.PythonMenubarGenerator'>): <menubar.codegen.PythonMenubarGenerator object at 0x7f7a26dfe350>
-> is_new (<type 'bool'>): True
-> code_lines (<type 'list'>): []
-> write (<type 'builtin_function_or_method'>): <built-in method append of list object at 0x7f7a2499ccb0>
-> code_obj (<class 'xml_parse.CodeObject'>): <xml_parse.CodeObject object at 0x7f7a1dddacd0>
-> sizers_init_lines (<type 'list'>): []
-> tab (<type 'str'>): '\t\t\t\t\t\t\t\t'
-> self (<class 'py_codegen.PythonCodeWriter'>): <py_codegen.PythonCodeWriter object at 0x7f7a271ef1d0>
-> layout_lines (<type 'list'>): []

Stack frame at level 2
======================
File "/usr/lib/python2.7/dist-packages/wxglade/codegen/py_codegen.py", line 460
Function "generate_code_do_layout(self=<py_codegen.PythonCodeWriter object at 0x7f7a271ef1d0>, builder=<menubar.codegen.PythonMenubarGenerator object at 0x7f7a26dfe350>, code_obj=<xml_parse.CodeObject object at 0x7f7a1dddacd0>, is_new=True, tab='\t\t\t\t\t\t\t\t')"
Source code context:
builder,
code_obj,
is_new,
-> tab,
)

def generate_code_event_bind(self, code_obj, tab, event_handlers):
Local variables:
-> code_obj (<class 'xml_parse.CodeObject'>): <xml_parse.CodeObject object at 0x7f7a1dddacd0>
-> builder (<class 'menubar.codegen.PythonMenubarGenerator'>): <menubar.codegen.PythonMenubarGenerator object at 0x7f7a26dfe350>
-> is_new (<type 'bool'>): True
-> tab (<type 'str'>): '\t\t\t\t\t\t\t\t'
-> self (<class 'py_codegen.PythonCodeWriter'>): <py_codegen.PythonCodeWriter object at 0x7f7a271ef1d0>

Stack frame at level 3
======================
File "/usr/lib/python2.7/dist-packages/wxglade/codegen/__init__.py", line 1359
Function "add_class(self=<py_codegen.PythonCodeWriter object at 0x7f7a271ef1d0>, code_obj=<xml_parse.CodeObject object at 0x7f7a1dddacd0>)"
Source code context:
builder,
code_obj,
is_new,
-> tab
)
obuffer.extend(code_lines)

Local variables:
-> indentation (<type 'str'>): '\t\t\t\t\t\t\t\t'
-> mods (<type 'list'>): []
-> obuffer (<type 'list'>): ['\nclass MenuBar(wx.MenuBar):\n',
'\t\t\t\tdef __init__(self, *args, **kwds):\n',
'\t\t\t\t\t\t\t\t# begin wxGlade: MenuBar.__init__\n',
'\t\t\t\t\t\t\t\twx.MenuBar.__init__(self, *args, **kwds)\n',
'\n\t\t\t\t\t\t\t\tself.__set_properties()\n\t\t\t\t\t\t\t\tself.__do_layout()\n',
'\t\t\t\t\t\t\t\t# end wxGlade\n',
'\n',
'\t\t\t\tdef __set_properties(self):\n',
'\t\t\t\t\t\t\t\t# begin wxGlade: MenuBar.__set_properties\n',
'\t\t\t\t\t\t\t\tpass\n',
'\t\t\t\t\t\t\t\t# end wxGlade\n',
'']
-> mycn (<type 'instancemethod'>): <bound method PythonMenubarGenerator.cn of <menubar.codegen.PythonMenubarGenerator object at 0x7f7a26dfe350>>
-> prev_src (<type 'NoneType'>): None
-> builder (<class 'menubar.codegen.PythonMenubarGenerator'>): <menubar.codegen.PythonMenubarGenerator object at 0x7f7a26dfe350>
-> extra_code (<type 'str'>): ''
-> code_lines (<type 'list'>): ['\n',
'\t\t\t\tdef __set_properties(self):\n',
'\t\t\t\t\t\t\t\t# begin wxGlade: MenuBar.__set_properties\n',
'\t\t\t\t\t\t\t\tpass\n',
'\t\t\t\t\t\t\t\t# end wxGlade\n',
'']
-> is_new (<type 'bool'>): True
-> write (<type 'builtin_function_or_method'>): <built-in method append of list object at 0x7f7a2499cb48>
-> code_obj (<class 'xml_parse.CodeObject'>): <xml_parse.CodeObject object at 0x7f7a1dddacd0>
-> mycn_f (<type 'instancemethod'>): <bound method PythonMenubarGenerator.cn_f of <menubar.codegen.PythonMenubarGenerator object at 0x7f7a26dfe350>>
-> tab (<type 'str'>): '\t\t\t\t\t\t\t\t'
-> filename (<type 'str'>): '/home/layer2/PyCharm_Projects/DMZ/2dViewer/MenuBar.py'
-> self (<class 'py_codegen.PythonCodeWriter'>): <py_codegen.PythonCodeWriter object at 0x7f7a271ef1d0>
-> event_handlers (<type 'list'>): []

Stack frame at level 4
======================
File "/usr/lib/python2.7/dist-packages/wxglade/xml_parse.py", line 816
Function "endElement(self=<xml_parse.CodeWriter instance at 0x7f7a24996f38>, name=u'object')"
Source code context:
# to its toplevel parent, or to generate the code for the custom
# class
if obj.is_toplevel and not obj.in_sizers:
-> self.code_writer.add_class(obj)
topl = self._toplevels.top()
if topl:
self.code_writer.add_object(topl, obj)
Local variables:
-> self (<type 'instance'>): <xml_parse.CodeWriter instance at 0x7f7a24996f38>
-> obj (<class 'xml_parse.CodeObject'>): <xml_parse.CodeObject object at 0x7f7a1dddacd0>
-> name (<type 'unicode'>): u'object'

Stack frame at level 5
======================
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 307
Function "end_element(self=<xml.sax.expatreader.ExpatParser instance at 0x7f7a24996e18>, name=u'object')"
Source code context:
self._cont_handler.startElement(name, AttributesImpl(attrs))

def end_element(self, name):
-> self._cont_handler.endElement(name)

def start_element_ns(self, name, attrs):
pair = name.split()
Local variables:
-> self (<type 'instance'>): <xml.sax.expatreader.ExpatParser instance at 0x7f7a24996e18>
-> name (<type 'unicode'>): u'object'

Stack frame at level 6
======================
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 210
Function "feed(self=<xml.sax.expatreader.ExpatParser instance at 0x7f7a24996e18>, data='<?xml version="1.0"?>\n<!-- generated by wxGlade 0.7.0 on Sat Feb 6 14:19:06 2016 -->\n\n<application path="/home/layer2/PyCharm_Projects/DMZ/2dViewer" name="app" class="MyApp" option="1" language="python" top_window="frame_1" encoding="UTF-8" use_gettext="1" overwrite="1" use_new_namespace="1" for_version="3.0" is_template="0" indent_amount="4" indent_symbol="tab" source_extension=".cpp" header_extension=".h">\n <object class="MenuBar" name="menubar" base="EditMenuBar">\n <menus>\n </menus>\n </object>\n <object class="MyFrame" name="frame_1" base="EditFrame">\n <title>frame_1</title>\n <object class="wxBoxSizer" name="sizer_1" base="EditBoxSizer">\n <orient>wxVERTICAL</orient>\n <object class="sizerslot" />\n </object>\n </object>\n</application>\n', isFinal=0)"
Source code context:
# If it is set to true, expat will check validity of the entire
# document. When feeding chunks, they are not normally final -
# except when invoked from close.
-> self._parser.Parse(data, isFinal)
except expat.error, e:
exc = SAXParseException(expat.ErrorString(e.code), e, self)
# FIXME: when to invoke error()?
Local variables:
-> self (<type 'instance'>): <xml.sax.expatreader.ExpatParser instance at 0x7f7a24996e18>
-> data (<type 'str'>): '<?xml version="1.0"?>\n<!-- generated by wxGlade 0.7.0 on Sat Feb 6 14:19:06 2016 -->\n\n<application path="/home/layer2/PyCharm_Projects/DMZ/2dViewer" name="app" class="MyApp" option="1" language="python" top_window="frame_1" encoding="UTF-8" use_gettext="1" overwrite="1" use_new_namespace="1" for_version="3.0" is_template="0" indent_amount="4" indent_symbol="tab" source_extension=".cpp" header_extension=".h">\n <object class="MenuBar" name="menubar" base="EditMenuBar">\n <menus>\n </menus>\n </object>\n <object class="MyFrame" name="frame_1" base="EditFrame">\n <title>frame_1</title>\n <object class="wxBoxSizer" name="sizer_1" base="EditBoxSizer">\n <orient>wxVERTICAL</orient>\n <object class="sizerslot" />\n </object>\n </object>\n</application>\n'
-> isFinal (<type 'int'>): 0

Stack frame at level 7
======================
File "/usr/lib/python2.7/xml/sax/xmlreader.py", line 123
Function "parse(self=<xml.sax.expatreader.ExpatParser instance at 0x7f7a24996e18>, source=<xml.sax.xmlreader.InputSource instance at 0x7f7a2499cef0>)"
Source code context:
file = source.getByteStream()
buffer = file.read(self._bufsize)
while buffer != "":
-> self.feed(buffer)
buffer = file.read(self._bufsize)
self.close()

Local variables:
-> buffer (<type 'str'>): '<?xml version="1.0"?>\n<!-- generated by wxGlade 0.7.0 on Sat Feb 6 14:19:06 2016 -->\n\n<application path="/home/layer2/PyCharm_Projects/DMZ/2dViewer" name="app" class="MyApp" option="1" language="python" top_window="frame_1" encoding="UTF-8" use_gettext="1" overwrite="1" use_new_namespace="1" for_version="3.0" is_template="0" indent_amount="4" indent_symbol="tab" source_extension=".cpp" header_extension=".h">\n <object class="MenuBar" name="menubar" base="EditMenuBar">\n <menus>\n </menus>\n </object>\n <object class="MyFrame" name="frame_1" base="EditFrame">\n <title>frame_1</title>\n <object class="wxBoxSizer" name="sizer_1" base="EditBoxSizer">\n <orient>wxVERTICAL</orient>\n <object class="sizerslot" />\n </object>\n </object>\n</application>\n'
-> source (<type 'instance'>): <xml.sax.xmlreader.InputSource instance at 0x7f7a2499cef0>
-> self (<type 'instance'>): <xml.sax.expatreader.ExpatParser instance at 0x7f7a24996e18>
-> file (<type 'instance'>): <StringIO.StringIO instance at 0x7f7a2499cd88>
-> saxutils (<type 'module'>): <module 'xml.sax.saxutils' from '/usr/lib/python2.7/xml/sax/saxutils.pyc'>

Stack frame at level 8
======================
File "/usr/lib/python2.7/xml/sax/expatreader.py", line 107
Function "parse(self=<xml.sax.expatreader.ExpatParser instance at 0x7f7a24996e18>, source=<xml.sax.xmlreader.InputSource instance at 0x7f7a2499cef0>)"
Source code context:
self._source = source
self.reset()
self._cont_handler.setDocumentLocator(ExpatLocator(self))
-> xmlreader.IncrementalParser.parse(self, source)

def prepareParser(self, source):
if source.getSystemId() is not None:
Local variables:
-> source (<type 'instance'>): <xml.sax.xmlreader.InputSource instance at 0x7f7a2499cef0>
-> self (<type 'instance'>): <xml.sax.expatreader.ExpatParser instance at 0x7f7a24996e18>

Stack frame at level 9
======================
File "/usr/lib/python2.7/dist-packages/wxglade/xml_parse.py", line 100
Function "parse_string(self=<xml_parse.CodeWriter instance at 0x7f7a24996f38>, source=<StringIO.StringIO instance at 0x7f7a2499cd88>)"
Source code context:

def parse_string(self, source):
source = StringIO.StringIO(source)
-> self.parser.parse(source)
source.close()

def setDocumentLocator(self, locator):
Local variables:
-> source (<type 'instance'>): <StringIO.StringIO instance at 0x7f7a2499cd88>
-> self (<type 'instance'>): <xml_parse.CodeWriter instance at 0x7f7a24996f38>

Stack frame at level 10
=======================
File "/usr/lib/python2.7/dist-packages/wxglade/xml_parse.py", line 683
Function "__init__(self=<xml_parse.CodeWriter instance at 0x7f7a24996f38>, writer=<py_codegen.PythonCodeWriter object at 0x7f7a271ef1d0>, input='<?xml version="1.0"?>\n<!-- generated by wxGlade 0.7.0 on Sat Feb 6 14:19:06 2016 -->\n\n<application path="/home/layer2/PyCharm_Projects/DMZ/2dViewer" name="app" class="MyApp" option="1" language="python" top_window="frame_1" encoding="UTF-8" use_gettext="1" overwrite="1" use_new_namespace="1" for_version="3.0" is_template="0" indent_amount="4" indent_symbol="tab" source_extension=".cpp" header_extension=".h">\n <object class="MenuBar" name="menubar" base="EditMenuBar">\n <menus>\n </menus>\n </object>\n <object class="MyFrame" name="frame_1" base="EditFrame">\n <title>frame_1</title>\n <object class="wxBoxSizer" name="sizer_1" base="EditBoxSizer">\n <orient>wxVERTICAL</orient>\n <object class="sizerslot" />\n </object>\n </object>\n</application>\n', from_string=True, out_path=None, preview=False, class_names=set(['wxBoxSizer', u'MyFrame', u'MenuBar']))"
Source code context:
self.class_names = set()

if from_string:
-> self.parse_string(input)
else:
inputfile = None
try:
Local variables:
-> preview (<type 'bool'>): False
-> out_path (<type 'NoneType'>): None
-> self (<type 'instance'>): <xml_parse.CodeWriter instance at 0x7f7a24996f38>
-> writer (<class 'py_codegen.PythonCodeWriter'>): <py_codegen.PythonCodeWriter object at 0x7f7a271ef1d0>
-> input (<type 'str'>): '<?xml version="1.0"?>\n<!-- generated by wxGlade 0.7.0 on Sat Feb 6 14:19:06 2016 -->\n\n<application path="/home/layer2/PyCharm_Projects/DMZ/2dViewer" name="app" class="MyApp" option="1" language="python" top_window="frame_1" encoding="UTF-8" use_gettext="1" overwrite="1" use_new_namespace="1" for_version="3.0" is_template="0" indent_amount="4" indent_symbol="tab" source_extension=".cpp" header_extension=".h">\n <object class="MenuBar" name="menubar" base="EditMenuBar">\n <menus>\n </menus>\n </object>\n <object class="MyFrame" name="frame_1" base="EditFrame">\n <title>frame_1</title>\n <object class="wxBoxSizer" name="sizer_1" base="EditBoxSizer">\n <orient>wxVERTICAL</orient>\n <object class="sizerslot" />\n </object>\n </object>\n</application>\n'
-> from_string (<type 'bool'>): True
-> class_names (<type 'set'>): set([u'MenuBar', u'MyFrame', 'wxBoxSizer'])

Stack frame at level 11
=======================
File "/usr/lib/python2.7/dist-packages/wxglade/application.py", line 721
Function "generate_code(self=<application.Application object at 0x7f7a26d3a890>, *args=(<wx._core.CommandEvent; proxy of <Swig Object of type 'wxCommandEvent *' at 0x7ffc82686070> >,), **kwds={})"
Source code context:
out.getvalue(), True,
preview=preview,
out_path=out_path,
-> class_names=class_names,
)
if preview and cw == 'python':
self.overwrite = overwrite
Local variables:
-> kwds (<type 'dict'>): {}
-> out_path (<type 'NoneType'>): None
-> self (<class 'application.Application'>): <application.Application object at 0x7f7a26d3a890>
-> args (<type 'tuple'>): (<wx._core.CommandEvent; proxy of <Swig Object of type 'wxCommandEvent *' at 0x7ffc82686070> >,)
-> inst (<type 'exceptions.AssertionError'>): AssertionError()
-> dialog (<class 'bugdialog.BugReport'>): <bugdialog.BugReport; proxy of <Swig Object of type 'wxDialog *' at 0x1a2b9e0> >
-> CodeWriter (<type 'classobj'>): <class xml_parse.CodeWriter at 0x7f7a29d34e20>
-> preview (<type 'bool'>): False
-> cw (<type 'str'>): 'python'
-> class_names (<type 'set'>): set([u'MenuBar', u'MyFrame', 'wxBoxSizer'])
-> out (<class 'misc.UnicodeStringIO'>): <misc.UnicodeStringIO object at 0x7f7a249ac390>

------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140

_______________________________________________
wxGlade-general mailing list
wxGlade-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/wxglade-general
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.