Re: Automatic ID generation no longer working?

Johan Vromans <[email protected]>
Newsgroups gmane.comp.python.wxglade
Organization Squirrel Consultancy
Message-ID <[email protected]>
On Wed, 18 Jan 2017 21:59:54 +0100, Dietmar Schwertberger
<[email protected]> wrote:

> please try with today's updates whether the generated code is correct
> again. 

Thanks, see below.

> Carsten had submitted changes to the menu generation and I could
> not find the bug in this. I've reverted these. We'll see how to proceed
> on that. As of now, the Perl/C++/Lisp and code generation is as it always
> was, so you still need to declare the ids yourself, just as you did.
> For Python code, that's not necessary any more, as the event handler for 
> a menu item is added in place instead of later.
> 
> With Python 3, your example file triggered a bug that I've also just 
> fixed. It's caused by using "Dialog Units". Does this have any 
> advantage? I never used these.

I only use them since they were default in some earlier version...

Anyway, I cannot load my .wxg since it triggers an exception:

ERROR   : An internal error occurred while loading file "wxchordpro.wxg"
An unexpected error occurred!

Date and time:       2017-01-18T23:17:38.716034
Python version:      2.7.11
wxPython version:    3.0.2.0
wxWidgets platform:  __WXGTK__
wxGlade version:     82a9a15407e0
Language code:       en_US
Encoding:            UTF-8
Filesystem encoding: UTF-8

Exception type:      <type 'exceptions.AttributeError'>
Exception details:   'NoneType' object has no attribute 'properties'
Application stack trace:
Stack frame at level 0
======================
  File "/home/jv/wrk/wxGlade/wxGlade-hg/widgets/toolbar/toolbar.py", line
665 Function "xml_builder(attrs=<xml.sax.xmlreader.AttributesImpl instance
at 0x7f827720b050>, parent=<frame.frame.EditFrame object at
0x7f8277456810>, sizer=None, sizeritem=None, pos=None)" Source code
0x7f8277456810>context: name = attrs.get('name')
          if parent is not None:
              if name:
  ->              parent._toolbar.properties["name"].set(name)
                  parent._toolbar.properties_changed(["name"])
              return parent._toolbar
          else:
  Local variables:
  -> name (<type 'unicode'>): u'f_main_toolbar'
  -> parent (<class 'frame.frame.EditFrame'>): <frame.frame.EditFrame
object at 0x7f8277456810> -> sizer (<type 'NoneType'>): None
  -> sizeritem (<type 'NoneType'>): None
  -> pos (<type 'NoneType'>): None
  -> attrs (<type 'instance'>): <xml.sax.xmlreader.AttributesImpl instance
at 0x7f827720b050>

Stack frame at level 1
======================
  File "/home/jv/wrk/wxGlade/wxGlade-hg/xml_parse.py", line 539
  Function "__init__(self=<xml_parse.XmlWidgetObject object at
0x7f8277484d50>, attrs=<xml.sax.xmlreader.AttributesImpl instance at
0x7f8277484d50>0x7f827720b050>, parser=<xml_parse.XmlWidgetBuilder instance
0x7f8277484d50>0x7f827720b050>at 0x7f82774c2710>)" Source code context:
      
                  # build the widget
                  if pos is not None: pos = int(pos)
  ->              self.obj = common.widgets_from_xml[base](attrs, parent,
sizer, sizeritem, pos) p = self.obj.properties.get("class")
                  if p: p.set(self.klass)
      
  Local variables:
  -> parent (<class 'frame.frame.EditFrame'>): <frame.frame.EditFrame
object at 0x7f8277456810> -> sizer (<type 'NoneType'>): None
  -> self (<class 'xml_parse.XmlWidgetObject'>): <xml_parse.XmlWidgetObject
object at 0x7f8277484d50> -> parser (<type 'instance'>):
<xml_parse.XmlWidgetBuilder instance at 0x7f82774c2710> -> pos (<type
'NoneType'>): None -> sizeritem (<type 'NoneType'>): None
  -> base (<type 'unicode'>): u'EditToolBar'
  -> attrs (<type 'instance'>): <xml.sax.xmlreader.AttributesImpl instance
at 0x7f827720b050>

Stack frame at level 2
======================
  File "/home/jv/wrk/wxGlade/wxGlade-hg/xml_parse.py", line 235
  Function "startElement(self=<xml_parse.XmlWidgetBuilder instance at
0x7f82774c2710>, name=u'object', attrs=<xml.sax.xmlreader.AttributesImpl
0x7f82774c2710>instance at 0x7f827720b050>)" Source code context:
                  top = self.top()
                  if top: top.notify_owner()
                  # create the object and push it on the appropriate stacks
  ->              XmlWidgetObject(attrs, self)
              else:
                  # handling of the various properties
                  try:
  Local variables:
  -> self (<type 'instance'>): <xml_parse.XmlWidgetBuilder instance at
0x7f82774c2710> -> top (<class 'xml_parse.XmlWidgetObject'>):
0x7f82774c2710> <xml_parse.XmlWidgetObject object at 0x7f82774c9110>
  -> attrs (<type 'instance'>): <xml.sax.xmlreader.AttributesImpl instance
at 0x7f827720b050> -> name (<type 'unicode'>): u'object'

Stack frame at level 3
======================
  File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 317
  Function "start_element(self=<xml.sax.expatreader.ExpatParser instance at
0x7f82774585a8>, name=u'object', attrs={u'base': u'EditToolBar', u'class':
0x7f82774585a8>u'wxToolBar', u'name': u'f_main_toolbar'})" Source code
0x7f82774585a8>context:
      
          # event handlers
          def start_element(self, name, attrs):
  ->          self._cont_handler.startElement(name, AttributesImpl(attrs))
      
          def end_element(self, name):
              self._cont_handler.endElement(name)
  Local variables:
  -> self (<type 'instance'>): <xml.sax.expatreader.ExpatParser instance at
0x7f82774585a8> -> attrs (<type 'dict'>): {u'base': u'EditToolBar',
0x7f82774585a8> u'class': u'wxToolBar', u'name': u'f_main_toolbar'}
  -> name (<type 'unicode'>): u'object'

Stack frame at level 4
======================
  File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 213
  Function "feed(self=<xml.sax.expatreader.ExpatParser instance at
0x7f82774585a8>, data='<?xml version="1.0"?>\n<!-- generated by wxGlade
0x7f82774585a8>0.7.2 on Mon Jan 16 22:28:55 2017 -->\n\n<application
0x7f82774585a8>class="App::Music::ChordPro::Wx" encoding="UTF-8"
0x7f82774585a8>for_version="2.8" header_extension=".h" indent_amount="4"
0x7f82774585a8>indent_symbol="space" is_template="0" language="perl"
0x7f82774585a8>name="" option="1" overwrite="1"
0x7f82774585a8>path="/home/jv/src/WxChordPro/lib" source_extension=".cpp"
0x7f82774585a8>top_window="f_main" use_gettext="1"
0x7f82774585a8>use_new_namespace="1">\n    <object
0x7f82774585a8>class="App::Music::ChordPro::Wx::Main_wxg" name="f_main"
0x7f82774585a8>base="EditFrame">\n
0x7f82774585a8><style>wxDEFAULT_FRAME_STYLE</style>\n
0x7f82774585a8><title>ChordPro</title>\n
0x7f82774585a8><menubar>1</menubar>\n
0x7f82774585a8><statusbar>1</statusbar>\n        <size>401,
0x7f82774585a8>311d</size>\n        <object class="wxMenuBar"
0x7f82774585a8>name="main_menubar" base="EditMenuBar">\n
0x7f82774585a8><menus>\n                <menu itemid="wxID_FILE"
0x7f82774585a8>label="File" name="">\n
0x7f82774585a8><item>\n
0x7f82774585a8><label>New</label>\n
0x7f82774585a8><id>wxID_NEW</id>\n                        <help_str>Create
0x7f82774585a8>a new ChordPro document</help_str>\n
0x7f82774585a8><handler>OnNew</handler>\n
0x7f82774585a8></item>\n                    <item>\n
0x7f82774585a8><label>Open...\tCtrl-O</label>\n
0x7f82774585a8><id>wxID_OPEN</id>\n                        <help_str>Open
0x7f82774585a8>an existing ChordPro
0x7f82774585a8>file</help_str>\n
0x7f82774585a8><handler>OnOpen</handler>\n
0x7f82774585a8></item>\n                    <item>\n
0x7f82774585a8><label>---</label>\n
0x7f82774585a8><id>---</id>\n
0x7f82774585a8><name>---</name>\n
0x7f82774585a8></item>\n                    <item>\n
0x7f82774585a8><label>Preview\tCtrl-P</label>\n
0x7f82774585a8><id>wxID_PREVIEW</id>\n
0x7f82774585a8><help_str>Format and
0x7f82774585a8>preview</help_str>\n
0x7f82774585a8><handler>OnPreview</handler>\n
0x7f82774585a8></item>\n                    <item>\n
0x7f82774585a8><label>Save...\tCtrl-S</label>\n
0x7f82774585a8><id>wxID_SAVE</id>\n                        <help_str>Save
0x7f82774585a8>the current ChordPro
0x7f82774585a8>file</help_str>\n
0x7f82774585a8><handler>OnSave</handler>\n
0x7f82774585a8></item>\n                    <item>\n
0x7f82774585a8><label>---</label>\n
0x7f82774585a8><id>---</id>\n
0x7f82774585a8><name>---</name>\n
0x7f82774585a8></item>\n                    <item>\n
0x7f82774585a8><label>Exit</label>\n
0x7f82774585a8><id>wxID_EXIT</id>\n
0x7f82774585a8><handler>OnQuit</handler>\n
0x7f82774585a8></item>\n                </menu>\n                <menu
0x7f82774585a8>itemid="wxID_EDIT" label="Edit"
0x7f82774585a8>name="">\n
0x7f82774585a8><item>\n
0x7f82774585a8><label>Undo</label>\n
0x7f82774585a8><id>wxID_UNDO</id>\n
0x7f82774585a8><handler>OnUndo</handler>\n
0x7f82774585a8></item>\n                    <item>\n
0x7f82774585a8><label>Redo</label>\n
0x7f82774585a8><id>wxID_REDO</id>\n
0x7f82774585a8><handler>OnRedo</handler>\n
0x7f82774585a8></item>\n                    <item>\n
0x7f82774585a8><label>---</label>\n
0x7f82774585a8><id>---</id>\n
0x7f82774585a8><name>---</name>\n
0x7f82774585a8></item>\n                    <item>\n
0x7f82774585a8><label>Cut</label>\n
0x7f82774585a8><id>wxID_CUT</id>\n
0x7f82774585a8><handler>OnCut</handler>\n
0x7f82774585a8></item>\n                    <item>\n
0x7f82774585a8><label>Copy</label>\n
0x7f82774585a8><id>wxID_COPY</id>\n
0x7f82774585a8><handler>OnCopy</handler>\n
0x7f82774585a8></item>\n                    <item>\n
0x7f82774585a8><label>Paste</label>\n
0x7f82774585a8><id>wxID_PASTE</id>\n
0x7f82774585a8><handler>OnPaste</handler>\n
0x7f82774585a8></item>\n                    <item>\n
0x7f82774585a8><label>Delete</label>\n
0x7f82774585a8><id>wxID_DELETE</id>\n
0x7f82774585a8><handler>OnDelete</handler>\n
0x7f82774585a8></item>\n                    <item>\n
0x7f82774585a8><label>---</label>\n
0x7f82774585a8><id>---</id>\n
0x7f82774585a8><name>---</name>\n
0x7f82774585a8></item>\n                    <item>\n
0x7f82774585a8><label>Preferences...</label>\n
0x7f82774585a8><id>wxID_PREFERENCES</id>\n
0x7f82774585a8><help_str>Preferences</help_str>\n
0x7f82774585a8><handler>OnPreferences</handler>\n
0x7f82774585a8></item>\n                </menu>\n                <menu
0x7f82774585a8>itemid="wxID_HELP" label="Help"
0x7f82774585a8>name="">\n
0x7f82774585a8><item>\n
0x7f82774585a8><label>ChordPro</label>\n
0x7f82774585a8><id>wxID_HELP_ChordPro=?</id>\n
0x7f82774585a8><help_str>Help about the ChordPro file
0x7f82774585a8>format</help_str>\n
0x7f82774585a8><handler>OnHelp_ChordPro</handler>\n
0x7f82774585a8></item>\n                </menu>\n                <menu
0x7f82774585a8>handler="OnAbout" label="About"
0x7f82774585a8>name="">\n
0x7f82774585a8><item>\n
0x7f82774585a8><label>About</label>\n
0x7f82774585a8><id>wxID_ABOUT</id>\n                        <help_str>About
0x7f82774585a8>WxChordPro</help_str>\n
0x7f82774585a8><handler>OnAbout</handler>\n
0x7f82774585a8></item>\n                </menu>\n
0x7f82774585a8></menus>\n        </object>\n        <object
0x7f82774585a8>class="wxToolBar" name="f_main_toolbar"
0x7f82774585a8>base="EditToolBar">\n            <tools>\n
0x7f82774585a8></tools>\n        </object>\n        <object
0x7f82774585a8>class="wxStatusBar" name="f_main_statusbar"
0x7f82774585a8>base="EditStatusBar">\n            <fields>\n
0x7f82774585a8><field width="-1">f_main_statusbar</field>\n
0x7f82774585a8></fields>\n
0x7f82774585a8><style>wxSTB_ELLIPSIZE_END</style>\n
0x7f82774585a8></object>\n        <object class="wxBoxSizer"
0x7f82774585a8>name="sz_outer" base="EditBoxSizer">\n
0x7f82774585a8><orient>wxVERTICAL</orient>\n            <object
0x7f82774585a8>class="sizeritem">\n
0x7f82774585a8><flag>wxEXPAND</flag>\n
0x7f82774585a8><border>0</border>\n
0x7f82774585a8><option>1</option>\n                <object
0x7f82774585a8>class="wxBoxSizer" name="sz_main"
0x7f82774585a8>base="EditBoxSizer">\n
0x7f82774585a8><orient>wxVERTICAL</orient>\n                    <object
0x7f82774585a8>class="sizeritem">\n
0x7f82774585a8><flag>wxALL|wxEXPAND</flag>\n
0x7f82774585a8><border>5</border>\n
0x7f82774585a8><option>1</option>\n                        <object
0x7f82774585a8>class="wxStaticBoxSizer" name="sz_source"
0x7f82774585a8>base="EditStaticBoxSizer">\n
0x7f82774585a8><orient>wxHORIZONTAL</orient>\n
0x7f82774585a8><label />\n                            <object
0x7f82774585a8>class="sizeritem">\n
0x7f82774585a8><flag>wxALL|wxEXPAND</flag>\n
0x7f82774585a8><border>5</border>\n
0x7f82774585a8><option>1</option>\n                                <object
0x7f82774585a8>class="wxTextCtrl" name="t_source"
0x7f82774585a8>base="EditTextCtrl">\n
0x7f82774585a8><style>wxTE_MULTILINE</style>\n
0x7f82774585a8></object>\n
0x7f82774585a8></object>\n
0x7f82774585a8></object>\n                    </object>\n
0x7f82774585a8></object>\n            </object>\n        </object>\n
0x7f82774585a8></object>\n</application>\n', isFinal=0)" Source code
0x7f82774585a8>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
0x7f82774585a8> -> data (<type 'str'>): '<?xml version="1.0"?>\n<!--
0x7f82774585a8> generated by wxGlade 0.7.2 on Mon Jan 16 22:28:55 2017
0x7f82774585a8> -->\n\n<application class="App::Music::ChordPro::Wx"
0x7f82774585a8> encoding="UTF-8" for_version="2.8" header_extension=".h"
0x7f82774585a8> indent_amount="4" indent_symbol="space" is_template="0"
0x7f82774585a8> language="perl" name="" option="1" overwrite="1"
0x7f82774585a8> path="/home/jv/src/WxChordPro/lib" source_extension=".cpp"
0x7f82774585a8> top_window="f_main" use_gettext="1"
0x7f82774585a8> use_new_namespace="1">\n    <object
0x7f82774585a8> class="App::Music::ChordPro::Wx::Main_wxg" name="f_main"
0x7f82774585a8> base="EditFrame">\n
0x7f82774585a8> <style>wxDEFAULT_FRAME_STYLE</style>\n
0x7f82774585a8> <title>ChordPro</title>\n
0x7f82774585a8> <menubar>1</menubar>\n
0x7f82774585a8> <statusbar>1</statusbar>\n        <size>401,
0x7f82774585a8> 311d</size>\n        <object class="wxMenuBar"
0x7f82774585a8> name="main_menubar" base="EditMenuBar">\n
0x7f82774585a8> <menus>\n                <menu itemid="wxID_FILE"
0x7f82774585a8> label="File" name="">\n
0x7f82774585a8> <item>\n
0x7f82774585a8> <label>New</label>\n
0x7f82774585a8> <id>wxID_NEW</id>\n                        <help_str>Create
0x7f82774585a8> a new ChordPro document</help_str>\n
0x7f82774585a8> <handler>OnNew</handler>\n
0x7f82774585a8> </item>\n
0x7f82774585a8> <item>\n
0x7f82774585a8> <label>Open...\tCtrl-O</label>\n
0x7f82774585a8> <id>wxID_OPEN</id>\n                        <help_str>Open
0x7f82774585a8> an existing ChordPro
0x7f82774585a8> file</help_str>\n
0x7f82774585a8> <handler>OnOpen</handler>\n
0x7f82774585a8> </item>\n
0x7f82774585a8> <item>\n
0x7f82774585a8> <label>---</label>\n
0x7f82774585a8> <id>---</id>\n
0x7f82774585a8> <name>---</name>\n
0x7f82774585a8> </item>\n
0x7f82774585a8> <item>\n
0x7f82774585a8> <label>Preview\tCtrl-P</label>\n
0x7f82774585a8> <id>wxID_PREVIEW</id>\n
0x7f82774585a8> <help_str>Format and
0x7f82774585a8> preview</help_str>\n
0x7f82774585a8> <handler>OnPreview</handler>\n
0x7f82774585a8> </item>\n
0x7f82774585a8> <item>\n
0x7f82774585a8> <label>Save...\tCtrl-S</label>\n
0x7f82774585a8> <id>wxID_SAVE</id>\n                        <help_str>Save
0x7f82774585a8> the current ChordPro
0x7f82774585a8> file</help_str>\n
0x7f82774585a8> <handler>OnSave</handler>\n
0x7f82774585a8> </item>\n
0x7f82774585a8> <item>\n
0x7f82774585a8> <label>---</label>\n
0x7f82774585a8> <id>---</id>\n
0x7f82774585a8> <name>---</name>\n
0x7f82774585a8> </item>\n
0x7f82774585a8> <item>\n
0x7f82774585a8> <label>Exit</label>\n
0x7f82774585a8> <id>wxID_EXIT</id>\n
0x7f82774585a8> <handler>OnQuit</handler>\n
0x7f82774585a8> </item>\n                </menu>\n                <menu
0x7f82774585a8> itemid="wxID_EDIT" label="Edit"
0x7f82774585a8> name="">\n
0x7f82774585a8> <item>\n
0x7f82774585a8> <label>Undo</label>\n
0x7f82774585a8> <id>wxID_UNDO</id>\n
0x7f82774585a8> <handler>OnUndo</handler>\n
0x7f82774585a8> </item>\n
0x7f82774585a8> <item>\n
0x7f82774585a8> <label>Redo</label>\n
0x7f82774585a8> <id>wxID_REDO</id>\n
0x7f82774585a8> <handler>OnRedo</handler>\n
0x7f82774585a8> </item>\n
0x7f82774585a8> <item>\n
0x7f82774585a8> <label>---</label>\n
0x7f82774585a8> <id>---</id>\n
0x7f82774585a8> <name>---</name>\n
0x7f82774585a8> </item>\n
0x7f82774585a8> <item>\n
0x7f82774585a8> <label>Cut</label>\n
0x7f82774585a8> <id>wxID_CUT</id>\n
0x7f82774585a8> <handler>OnCut</handler>\n
0x7f82774585a8> </item>\n
0x7f82774585a8> <item>\n
0x7f82774585a8> <label>Copy</label>\n
0x7f82774585a8> <id>wxID_COPY</id>\n
0x7f82774585a8> <handler>OnCopy</handler>\n
0x7f82774585a8> </item>\n
0x7f82774585a8> <item>\n
0x7f82774585a8> <label>Paste</label>\n
0x7f82774585a8> <id>wxID_PASTE</id>\n
0x7f82774585a8> <handler>OnPaste</handler>\n
0x7f82774585a8> </item>\n
0x7f82774585a8> <item>\n
0x7f82774585a8> <label>Delete</label>\n
0x7f82774585a8> <id>wxID_DELETE</id>\n
0x7f82774585a8> <handler>OnDelete</handler>\n
0x7f82774585a8> </item>\n
0x7f82774585a8> <item>\n
0x7f82774585a8> <label>---</label>\n
0x7f82774585a8> <id>---</id>\n
0x7f82774585a8> <name>---</name>\n
0x7f82774585a8> </item>\n
0x7f82774585a8> <item>\n
0x7f82774585a8> <label>Preferences...</label>\n
0x7f82774585a8> <id>wxID_PREFERENCES</id>\n
0x7f82774585a8> <help_str>Preferences</help_str>\n
0x7f82774585a8> <handler>OnPreferences</handler>\n
0x7f82774585a8> </item>\n                </menu>\n                <menu
0x7f82774585a8> itemid="wxID_HELP" label="Help"
0x7f82774585a8> name="">\n
0x7f82774585a8> <item>\n
0x7f82774585a8> <label>ChordPro</label>\n
0x7f82774585a8> <id>wxID_HELP_ChordPro=?</id>\n
0x7f82774585a8> <help_str>Help about the ChordPro file
0x7f82774585a8> format</help_str>\n
0x7f82774585a8> <handler>OnHelp_ChordPro</handler>\n
0x7f82774585a8> </item>\n                </menu>\n                <menu
0x7f82774585a8> handler="OnAbout" label="About"
0x7f82774585a8> name="">\n
0x7f82774585a8> <item>\n
0x7f82774585a8> <label>About</label>\n
0x7f82774585a8> <id>wxID_ABOUT</id>\n
0x7f82774585a8> <help_str>About
0x7f82774585a8> WxChordPro</help_str>\n
0x7f82774585a8> <handler>OnAbout</handler>\n
0x7f82774585a8> </item>\n                </menu>\n
0x7f82774585a8> </menus>\n        </object>\n        <object
0x7f82774585a8> class="wxToolBar" name="f_main_toolbar"
0x7f82774585a8> base="EditToolBar">\n            <tools>\n
0x7f82774585a8> </tools>\n        </object>\n        <object
0x7f82774585a8> class="wxStatusBar" name="f_main_statusbar"
0x7f82774585a8> base="EditStatusBar">\n
0x7f82774585a8> <fields>\n                <field
0x7f82774585a8> width="-1">f_main_statusbar</field>\n
0x7f82774585a8> </fields>\n
0x7f82774585a8> <style>wxSTB_ELLIPSIZE_END</style>\n
0x7f82774585a8> </object>\n        <object class="wxBoxSizer"
0x7f82774585a8> name="sz_outer" base="EditBoxSizer">\n
0x7f82774585a8> <orient>wxVERTICAL</orient>\n            <object
0x7f82774585a8> class="sizeritem">\n
0x7f82774585a8> <flag>wxEXPAND</flag>\n
0x7f82774585a8> <border>0</border>\n
0x7f82774585a8> <option>1</option>\n                <object
0x7f82774585a8> class="wxBoxSizer" name="sz_main"
0x7f82774585a8> base="EditBoxSizer">\n
0x7f82774585a8> <orient>wxVERTICAL</orient>\n                    <object
0x7f82774585a8> class="sizeritem">\n
0x7f82774585a8> <flag>wxALL|wxEXPAND</flag>\n
0x7f82774585a8> <border>5</border>\n
0x7f82774585a8> <option>1</option>\n                        <object
0x7f82774585a8> class="wxStaticBoxSizer" name="sz_source"
0x7f82774585a8> base="EditStaticBoxSizer">\n
0x7f82774585a8> <orient>wxHORIZONTAL</orient>\n
0x7f82774585a8> <label />\n                            <object
0x7f82774585a8> class="sizeritem">\n
0x7f82774585a8> <flag>wxALL|wxEXPAND</flag>\n
0x7f82774585a8> <border>5</border>\n
0x7f82774585a8> <option>1</option>\n                                <object
0x7f82774585a8> class="wxTextCtrl" name="t_source"
0x7f82774585a8> base="EditTextCtrl">\n
0x7f82774585a8> <style>wxTE_MULTILINE</style>\n
0x7f82774585a8> </object>\n
0x7f82774585a8> </object>\n
0x7f82774585a8> </object>\n                    </object>\n
0x7f82774585a8> </object>\n            </object>\n        </object>\n
0x7f82774585a8> </object>\n</application>\n'
  -> isFinal (<type 'int'>): 0

Stack frame at level 5
======================
  File "/usr/lib64/python2.7/xml/sax/xmlreader.py", line 123
  Function "parse(self=<xml.sax.expatreader.ExpatParser instance at
0x7f82774585a8>, source=<xml.sax.xmlreader.InputSource instance at
0x7f82774585a8>0x7f8277458758>)" 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.2 on Mon Jan 16 22:28:55 2017 -->\n\n<application
class="App::Music::ChordPro::Wx" encoding="UTF-8" for_version="2.8"
header_extension=".h" indent_amount="4" indent_symbol="space"
is_template="0" language="perl" name="" option="1" overwrite="1"
path="/home/jv/src/WxChordPro/lib" source_extension=".cpp"
top_window="f_main" use_gettext="1" use_new_namespace="1">\n    <object
class="App::Music::ChordPro::Wx::Main_wxg" name="f_main"
base="EditFrame">\n        <style>wxDEFAULT_FRAME_STYLE</style>\n
<title>ChordPro</title>\n        <menubar>1</menubar>\n
<statusbar>1</statusbar>\n        <size>401, 311d</size>\n        <object
class="wxMenuBar" name="main_menubar" base="EditMenuBar">\n
<menus>\n                <menu itemid="wxID_FILE" label="File"
name="">\n                    <item>\n
<label>New</label>\n
<id>wxID_NEW</id>\n                        <help_str>Create a new ChordPro
document</help_str>\n
<handler>OnNew</handler>\n                    </item>\n
<item>\n
<label>Open...\tCtrl-O</label>\n
<id>wxID_OPEN</id>\n                        <help_str>Open an existing
ChordPro file</help_str>\n
<handler>OnOpen</handler>\n                    </item>\n
<item>\n                        <label>---</label>\n
<id>---</id>\n                        <name>---</name>\n
</item>\n                    <item>\n
<label>Preview\tCtrl-P</label>\n
<id>wxID_PREVIEW</id>\n                        <help_str>Format and
preview</help_str>\n
<handler>OnPreview</handler>\n
</item>\n                    <item>\n
<label>Save...\tCtrl-S</label>\n
<id>wxID_SAVE</id>\n                        <help_str>Save the current
ChordPro file</help_str>\n
<handler>OnSave</handler>\n                    </item>\n
<item>\n                        <label>---</label>\n
<id>---</id>\n                        <name>---</name>\n
</item>\n                    <item>\n
<label>Exit</label>\n
<id>wxID_EXIT</id>\n
<handler>OnQuit</handler>\n                    </item>\n
</menu>\n                <menu itemid="wxID_EDIT" label="Edit"
name="">\n                    <item>\n
<label>Undo</label>\n
<id>wxID_UNDO</id>\n
<handler>OnUndo</handler>\n                    </item>\n
<item>\n
<label>Redo</label>\n
<id>wxID_REDO</id>\n
<handler>OnRedo</handler>\n                    </item>\n
<item>\n                        <label>---</label>\n
<id>---</id>\n                        <name>---</name>\n
</item>\n                    <item>\n
<label>Cut</label>\n
<id>wxID_CUT</id>\n
<handler>OnCut</handler>\n                    </item>\n
<item>\n
<label>Copy</label>\n
<id>wxID_COPY</id>\n
<handler>OnCopy</handler>\n                    </item>\n
<item>\n
<label>Paste</label>\n
<id>wxID_PASTE</id>\n
<handler>OnPaste</handler>\n
</item>\n                    <item>\n
<label>Delete</label>\n
<id>wxID_DELETE</id>\n
<handler>OnDelete</handler>\n
</item>\n                    <item>\n
<label>---</label>\n
<id>---</id>\n                        <name>---</name>\n
</item>\n                    <item>\n
<label>Preferences...</label>\n
<id>wxID_PREFERENCES</id>\n
<help_str>Preferences</help_str>\n
<handler>OnPreferences</handler>\n
</item>\n                </menu>\n                <menu itemid="wxID_HELP"
label="Help" name="">\n                    <item>\n
<label>ChordPro</label>\n
<id>wxID_HELP_ChordPro=?</id>\n                        <help_str>Help about
the ChordPro file format</help_str>\n
<handler>OnHelp_ChordPro</handler>\n
</item>\n                </menu>\n                <menu handler="OnAbout"
label="About" name="">\n                    <item>\n
<label>About</label>\n
<id>wxID_ABOUT</id>\n                        <help_str>About
WxChordPro</help_str>\n
<handler>OnAbout</handler>\n                    </item>\n
</menu>\n            </menus>\n        </object>\n        <object
class="wxToolBar" name="f_main_toolbar" base="EditToolBar">\n
<tools>\n            </tools>\n        </object>\n        <object
class="wxStatusBar" name="f_main_statusbar"
base="EditStatusBar">\n            <fields>\n                <field
width="-1">f_main_statusbar</field>\n            </fields>\n
<style>wxSTB_ELLIPSIZE_END</style>\n        </object>\n        <object
class="wxBoxSizer" name="sz_outer" base="EditBoxSizer">\n
<orient>wxVERTICAL</orient>\n            <object
class="sizeritem">\n                <flag>wxEXPAND</flag>\n
<border>0</border>\n                <option>1</option>\n
<object class="wxBoxSizer" name="sz_main"
base="EditBoxSizer">\n
<orient>wxVERTICAL</orient>\n                    <object
class="sizeritem">\n
<flag>wxALL|wxEXPAND</flag>\n
<border>5</border>\n
<option>1</option>\n                        <object
class="wxStaticBoxSizer" name="sz_source"
base="EditStaticBoxSizer">\n
<orient>wxHORIZONTAL</orient>\n
<label />\n                            <object
class="sizeritem">\n
<flag>wxALL|wxEXPAND</flag>\n
<border>5</border>\n
<option>1</option>\n                                <object
class="wxTextCtrl" name="t_source"
base="EditTextCtrl">\n
<style>wxTE_MULTILINE</style>\n
</object>\n                            </object>\n
</object>\n                    </object>\n
</object>\n            </object>\n        </object>\n
</object>\n</application>\n' -> source (<type 'instance'>):
<xml.sax.xmlreader.InputSource instance at 0x7f8277458758> -> self (<type
'instance'>): <xml.sax.expatreader.ExpatParser instance at 0x7f82774585a8>
-> file (<type 'instance'>): <StringIO.StringIO instance at 0x7f82774585f0>
-> saxutils (<type 'module'>): <module 'xml.sax.saxutils' from
'/usr/lib64/python2.7/xml/sax/saxutils.pyc'>

Stack frame at level 6
======================
  File "/usr/lib64/python2.7/xml/sax/expatreader.py", line 110
  Function "parse(self=<xml.sax.expatreader.ExpatParser instance at
0x7f82774585a8>, source=<xml.sax.xmlreader.InputSource instance at
0x7f82774585a8>0x7f8277458758>)" 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
0x7f8277458758> -> self (<type 'instance'>):
0x7f8277458758> <xml.sax.expatreader.ExpatParser instance at 0x7f82774585a8>

Stack frame at level 7
======================
  File "/home/jv/wrk/wxGlade/wxGlade-hg/xml_parse.py", line 58
  Function "parse(self=<xml_parse.XmlWidgetBuilder instance at
0x7f82774c2710>, source=<StringIO.StringIO instance at 0x7f82774585f0>)"
0x7f82774c2710>Source code context:
              #
              # That's not a general file handling issue because the
parameter source is an open file already. source =
compat.StringIO(source.read()) ->          self.parser.parse(source)
              source.close()
      
          def parse_string(self, source):
  Local variables:
  -> source (<type 'instance'>): <StringIO.StringIO instance at
0x7f82774585f0> -> self (<type 'instance'>): <xml_parse.XmlWidgetBuilder
0x7f82774585f0> instance at 0x7f82774c2710>

Stack frame at level 8
======================
  File "/home/jv/wrk/wxGlade/wxGlade-hg/main.py", line 688
  Function "_open_app(self=<main.wxGladeFrame; proxy of <Swig Object of
type 'wxFrame *' at 0x55c1d7398400> >,
filename_or_filelike='/home/jv/src/WxChordPro/script/wxchordpro.wxg',
use_progress_dialog=False, add_to_history=True)" Source code context: else:
p = XmlWidgetBuilder() 
  ->                  p.parse(infile)
                  except (EnvironmentError, SAXParseException,
XmlParsingError) as msg: if filename:
                          error_msg = _("Error loading file %s: %s") %
(misc.wxstr(filename), misc.wxstr(msg)) Local variables:
  -> old_dir (<type 'str'>): '/home/jv/src/WxChordPro/script'
  -> error_msg (<type 'NoneType'>): None
  -> add_to_history (<type 'bool'>): True
  -> start (<type 'float'>): 1.057188
  -> self (<class 'main.wxGladeFrame'>): <main.wxGladeFrame; proxy of <Swig
Object of type 'wxFrame *' at 0x55c1d7398400> > -> filename (<type 'str'>):
'/home/jv/src/WxChordPro/script/wxchordpro.wxg' -> p (<type 'instance'>):
<xml_parse.XmlWidgetBuilder instance at 0x7f82774c2710> ->
use_progress_dialog (<type 'bool'>): False -> inst (<type
'exceptions.AttributeError'>): AttributeError("'NoneType' object has no
attribute 'properties'",) -> filename_or_filelike (<type 'str'>):
'/home/jv/src/WxChordPro/script/wxchordpro.wxg' -> msg (<type 'unicode'>):
u'loading file "wxchordpro.wxg"' -> infile (<type 'file'>): <open file
'/home/jv/src/WxChordPro/script/wxchordpro.wxg', mode 'r' at
0x7f8277547930> -> fn (<type 'str'>): 'wxchordpro.wxg'

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot

_______________________________________________
wxGlade-general mailing list
wxGlade-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
https://lists.sourceforge.net/lists/listinfo/wxglade-general
wxchordpro.wxg (application/octet-stream, 6.7 KB) - not displayed
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.