Killing Python and wxPython

Hey Robin (and everyone else),

I've once again wandered into a Python garbage collection issue that
fairly reliably kills a wxPython application.

main thread:
    repeated STC style changes via STCStyleEditor,
    which uses wxFileConfig

second thread:
    heavy C-level Python object allocation via compiler.parse()

I've hacked together a demo which includes everything necessary to
demonstrate this.

It breaks ansi wxPython 2.6.1.0 and 2.6.2.1 on Python 2.3.3 and Python
2.4.2 on Windows 2000. I've not tried unicode wxPython, but I wouldn't
imagine it would fare any better.

Can anyone verify if this does/does not break on their platform? You
may need to adjust the value of FC on the second line of smackgui2.py if
your platform is significantly slower or faster than a 2.8 ghz P4 (it's
the delay between style changes).

Behavior I have observed after the button has been pushed:
1. Fatal Python error: GC object already tracked
2. Everything works fine, but closing the program never returns you to
the command prompt.
3. ''"The instruction at "..." referenced memory at "...". The memory
could not be "read".'' The first address is obviously an instruction
address and varies within the binary image, the second address very much
likes to be 0xFFFFFFXX or 0x000000XX for some 'XX', and tends to vary
via quantum entanglement with the cat hair in my keyboard, but it has
been in the image, stack, and heap.
4. The application uses as much processor as it can, and becomes
non-responsive.
5. An unbelieveable traceback [1] whereby the two threads seemed to have
exchanged values (Mainthread got the result of 'len(nodelist') as its
input for len(val), and Thread-1 got 'val' as an argument to range).
6. On occasion, it works for a short period. I can move the window,
scroll, etc., and it doesn't die...for about 5 seconds.

- Josiah

[1] - (it's not the length, look at the exceptions themselves!)

Traceback (most recent call last):
  File "C:\Python23\lib\site-packages\wx-2.6-msw-ansi\wx\_misc.py", line 1137, in Notify
    self.notify()
  File "C:\Python23\lib\site-packages\wx-2.6-msw-ansi\wx\_core.py", line 13368, in Notify
    self.result = self.callable(*self.args, **self.kwargs)
  File "D:\MYDOCS\Projects\python\smackgui2.py", line 60, in Style
    STCStyleEditor.initSTC(self.stc, config, 'python')
  File "D:\MYDOCS\Projects\python\STCStyleEditor.py", line 1307, in initSTC
    (cfg, commonDefs, styleIdNames, styles, predefStyleGroupNames,
  File "D:\MYDOCS\Projects\python\STCStyleEditor.py", line 1231, in initFromConfig
    if val != groupPrefix and len(val) >= 5 and val[:5] == 'style':
TypeError: len() of unsized object
Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Python23\lib\threading.py", line 436, in __bootstrap
    self.run()
  File "C:\Python23\lib\threading.py", line 416, in run
    self.__target(*self.__args, **self.__kwargs)
  File "D:\MYDOCS\Projects\python\smackgui2.py", line 30, in compile
    x = compiler.parse(gs)
  File "C:\python23\lib\compiler\transformer.py", line 50, in parse
    return Transformer().parsesuite(buf)
  File "C:\python23\lib\compiler\transformer.py", line 120, in parsesuite
    return self.transform(parser.suite(text))
  File "C:\python23\lib\compiler\transformer.py", line 113, in transform
    return self.compile_node(tree)
  File "C:\python23\lib\compiler\transformer.py", line 149, in compile_node
    return self.file_input(node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 180, in file_input
    self.com_append_stmt(stmts, node)
  File "C:\python23\lib\compiler\transformer.py", line 1019, in com_append_stmt
    result = self.com_node(node)
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
    return self.com_stmt(nodelist[0])
  File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
    result = self.lookup_node(node)(node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
    return self.com_stmt(nodelist[0])
  File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
    result = self.lookup_node(node)(node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 204, in funcdef
    code = self.com_node(nodelist[4])
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 519, in suite
    self.com_append_stmt(stmts, node)
  File "C:\python23\lib\compiler\transformer.py", line 1019, in com_append_stmt
    result = self.com_node(node)
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
    return self.com_stmt(nodelist[0])
  File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
    result = self.lookup_node(node)(node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
    return self.com_stmt(nodelist[0])
  File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
    result = self.lookup_node(node)(node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 204, in funcdef
    code = self.com_node(nodelist[4])
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 519, in suite
    self.com_append_stmt(stmts, node)
  File "C:\python23\lib\compiler\transformer.py", line 1019, in com_append_stmt
    result = self.com_node(node)
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
    return self.com_stmt(nodelist[0])
  File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
    result = self.lookup_node(node)(node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
    return self.com_stmt(nodelist[0])
  File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
    result = self.lookup_node(node)(node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 476, in while_stmt
    bodyNode = self.com_node(nodelist[3])
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 519, in suite
    self.com_append_stmt(stmts, node)
  File "C:\python23\lib\compiler\transformer.py", line 1019, in com_append_stmt
    result = self.com_node(node)
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
    return self.com_stmt(nodelist[0])
  File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
    result = self.lookup_node(node)(node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 262, in simple_stmt
    self.com_append_stmt(stmts, nodelist[i])
  File "C:\python23\lib\compiler\transformer.py", line 1019, in com_append_stmt
    result = self.com_node(node)
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
    return self.com_stmt(nodelist[0])
  File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
    result = self.lookup_node(node)(node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 300, in expr_stmt
    exprNode = self.lookup_node(en)(en[1:])
  File "C:\python23\lib\compiler\transformer.py", line 531, in testlist
    return self.com_binary(Tuple, nodelist)
  File "C:\python23\lib\compiler\transformer.py", line 1004, in com_binary
    return self.lookup_node(n)(n[1:])
  File "C:\python23\lib\compiler\transformer.py", line 541, in test
    return self.com_binary(Or, nodelist)
  File "C:\python23\lib\compiler\transformer.py", line 1004, in com_binary
    return self.lookup_node(n)(n[1:])
  File "C:\python23\lib\compiler\transformer.py", line 545, in and_test
    return self.com_binary(And, nodelist)
  File "C:\python23\lib\compiler\transformer.py", line 1004, in com_binary
    return self.lookup_node(n)(n[1:])
  File "C:\python23\lib\compiler\transformer.py", line 549, in not_test
    result = self.com_node(nodelist[-1])
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 558, in comparison
    node = self.com_node(nodelist[0])
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 593, in expr
    return self.com_binary(Bitor, nodelist)
  File "C:\python23\lib\compiler\transformer.py", line 1004, in com_binary
    return self.lookup_node(n)(n[1:])
  File "C:\python23\lib\compiler\transformer.py", line 597, in xor_expr
    return self.com_binary(Bitxor, nodelist)
  File "C:\python23\lib\compiler\transformer.py", line 1004, in com_binary
    return self.lookup_node(n)(n[1:])
  File "C:\python23\lib\compiler\transformer.py", line 601, in and_expr
    return self.com_binary(Bitand, nodelist)
  File "C:\python23\lib\compiler\transformer.py", line 1004, in com_binary
    return self.lookup_node(n)(n[1:])
  File "C:\python23\lib\compiler\transformer.py", line 606, in shift_expr
    for i in range(2, len(nodelist), 2):
TypeError: range() integer end argument expected, got str.

kill_gui.zip (18 KB)

Hello. It is not breaks when i starting app. I'm using FreeBSD6 with python 2.4.2 and wxPython-2.6.1.0-unicode and wxGTK 2.6.2.

So, i'm leave default FC value (of 100) and click 'Start threads'. It worked well. But when i tryed to close the app - it seems like hang on. So i shutdown it with ^c. And yes, application works too slow on my machine - p3-700/256RAM

Josiah Carlson wrote:

···

Hey Robin (and everyone else),

I've once again wandered into a Python garbage collection issue that
fairly reliably kills a wxPython application.

main thread:
    repeated STC style changes via STCStyleEditor,
    which uses wxFileConfig

second thread:
    heavy C-level Python object allocation via compiler.parse()

I've hacked together a demo which includes everything necessary to
demonstrate this.

It breaks ansi wxPython 2.6.1.0 and 2.6.2.1 on Python 2.3.3 and Python
2.4.2 on Windows 2000. I've not tried unicode wxPython, but I wouldn't
imagine it would fare any better.

Can anyone verify if this does/does not break on their platform? You
may need to adjust the value of FC on the second line of smackgui2.py if
your platform is significantly slower or faster than a 2.8 ghz P4 (it's
the delay between style changes).

Behavior I have observed after the button has been pushed:
1. Fatal Python error: GC object already tracked
2. Everything works fine, but closing the program never returns you to
the command prompt.
3. ''"The instruction at "..." referenced memory at "...". The memory
could not be "read".'' The first address is obviously an instruction
address and varies within the binary image, the second address very much
likes to be 0xFFFFFFXX or 0x000000XX for some 'XX', and tends to vary
via quantum entanglement with the cat hair in my keyboard, but it has
been in the image, stack, and heap.
4. The application uses as much processor as it can, and becomes
non-responsive.
5. An unbelieveable traceback [1] whereby the two threads seemed to have
exchanged values (Mainthread got the result of 'len(nodelist') as its
input for len(val), and Thread-1 got 'val' as an argument to range).
6. On occasion, it works for a short period. I can move the window,
scroll, etc., and it doesn't die...for about 5 seconds.

- Josiah

[1] - (it's not the length, look at the exceptions themselves!)

Traceback (most recent call last):
  File "C:\Python23\lib\site-packages\wx-2.6-msw-ansi\wx\_misc.py", line 1137, in Notify
    self.notify()
  File "C:\Python23\lib\site-packages\wx-2.6-msw-ansi\wx\_core.py", line 13368, in Notify
    self.result = self.callable(*self.args, **self.kwargs)
  File "D:\MYDOCS\Projects\python\smackgui2.py", line 60, in Style
    STCStyleEditor.initSTC(self.stc, config, 'python')
  File "D:\MYDOCS\Projects\python\STCStyleEditor.py", line 1307, in initSTC
    (cfg, commonDefs, styleIdNames, styles, predefStyleGroupNames,
  File "D:\MYDOCS\Projects\python\STCStyleEditor.py", line 1231, in initFromConfig
    if val != groupPrefix and len(val) >= 5 and val[:5] == 'style':
TypeError: len() of unsized object
Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Python23\lib\threading.py", line 436, in __bootstrap
    self.run()
  File "C:\Python23\lib\threading.py", line 416, in run
    self.__target(*self.__args, **self.__kwargs)
  File "D:\MYDOCS\Projects\python\smackgui2.py", line 30, in compile
    x = compiler.parse(gs)
  File "C:\python23\lib\compiler\transformer.py", line 50, in parse
    return Transformer().parsesuite(buf)
  File "C:\python23\lib\compiler\transformer.py", line 120, in parsesuite
    return self.transform(parser.suite(text))
  File "C:\python23\lib\compiler\transformer.py", line 113, in transform
    return self.compile_node(tree)
  File "C:\python23\lib\compiler\transformer.py", line 149, in compile_node
    return self.file_input(node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 180, in file_input
    self.com_append_stmt(stmts, node)
  File "C:\python23\lib\compiler\transformer.py", line 1019, in com_append_stmt
    result = self.com_node(node)
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
    return self.com_stmt(nodelist[0])
  File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
    result = self.lookup_node(node)(node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
    return self.com_stmt(nodelist[0])
  File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
    result = self.lookup_node(node)(node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 204, in funcdef
    code = self.com_node(nodelist[4])
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 519, in suite
    self.com_append_stmt(stmts, node)
  File "C:\python23\lib\compiler\transformer.py", line 1019, in com_append_stmt
    result = self.com_node(node)
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
    return self.com_stmt(nodelist[0])
  File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
    result = self.lookup_node(node)(node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
    return self.com_stmt(nodelist[0])
  File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
    result = self.lookup_node(node)(node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 204, in funcdef
    code = self.com_node(nodelist[4])
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 519, in suite
    self.com_append_stmt(stmts, node)
  File "C:\python23\lib\compiler\transformer.py", line 1019, in com_append_stmt
    result = self.com_node(node)
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
    return self.com_stmt(nodelist[0])
  File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
    result = self.lookup_node(node)(node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
    return self.com_stmt(nodelist[0])
  File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
    result = self.lookup_node(node)(node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 476, in while_stmt
    bodyNode = self.com_node(nodelist[3])
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 519, in suite
    self.com_append_stmt(stmts, node)
  File "C:\python23\lib\compiler\transformer.py", line 1019, in com_append_stmt
    result = self.com_node(node)
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
    return self.com_stmt(nodelist[0])
  File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
    result = self.lookup_node(node)(node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 262, in simple_stmt
    self.com_append_stmt(stmts, nodelist[i])
  File "C:\python23\lib\compiler\transformer.py", line 1019, in com_append_stmt
    result = self.com_node(node)
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
    return self.com_stmt(nodelist[0])
  File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
    result = self.lookup_node(node)(node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 300, in expr_stmt
    exprNode = self.lookup_node(en)(en[1:])
  File "C:\python23\lib\compiler\transformer.py", line 531, in testlist
    return self.com_binary(Tuple, nodelist)
  File "C:\python23\lib\compiler\transformer.py", line 1004, in com_binary
    return self.lookup_node(n)(n[1:])
  File "C:\python23\lib\compiler\transformer.py", line 541, in test
    return self.com_binary(Or, nodelist)
  File "C:\python23\lib\compiler\transformer.py", line 1004, in com_binary
    return self.lookup_node(n)(n[1:])
  File "C:\python23\lib\compiler\transformer.py", line 545, in and_test
    return self.com_binary(And, nodelist)
  File "C:\python23\lib\compiler\transformer.py", line 1004, in com_binary
    return self.lookup_node(n)(n[1:])
  File "C:\python23\lib\compiler\transformer.py", line 549, in not_test
    result = self.com_node(nodelist[-1])
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 558, in comparison
    node = self.com_node(nodelist[0])
  File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
    return self._dispatch[node[0]](node[1:])
  File "C:\python23\lib\compiler\transformer.py", line 593, in expr
    return self.com_binary(Bitor, nodelist)
  File "C:\python23\lib\compiler\transformer.py", line 1004, in com_binary
    return self.lookup_node(n)(n[1:])
  File "C:\python23\lib\compiler\transformer.py", line 597, in xor_expr
    return self.com_binary(Bitxor, nodelist)
  File "C:\python23\lib\compiler\transformer.py", line 1004, in com_binary
    return self.lookup_node(n)(n[1:])
  File "C:\python23\lib\compiler\transformer.py", line 601, in and_expr
    return self.com_binary(Bitand, nodelist)
  File "C:\python23\lib\compiler\transformer.py", line 1004, in com_binary
    return self.lookup_node(n)(n[1:])
  File "C:\python23\lib\compiler\transformer.py", line 606, in shift_expr
    for i in range(2, len(nodelist), 2):
TypeError: range() integer end argument expected, got str.

------------------------------------------------------------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Hello. It is not breaks when i starting app. I'm using FreeBSD6 with
python 2.4.2 and wxPython-2.6.1.0-unicode and wxGTK 2.6.2.

It shouldn't break when it just starts up, but if it is using more than
50% of your processor, you should increase the FC value until it runs
with around 30-40% of your processor.

So, i'm leave default FC value (of 100) and click 'Start threads'. It
worked well. But when i tryed to close the app - it seems like hang on.
So i shutdown it with ^c. And yes, application works too slow on my
machine - p3-700/256RAM

What versions of wxPython and Python are you using? Anyone else have
this problem on a fast machine?

- Josiah

···

Vyacheslav Sotnikov <bsdforfree@rambler.ru> wrote:

Josiah Carlson wrote:
> Hey Robin (and everyone else),
>
> I've once again wandered into a Python garbage collection issue that
> fairly reliably kills a wxPython application.
>
> main thread:
> repeated STC style changes via STCStyleEditor,
> which uses wxFileConfig
>
> second thread:
> heavy C-level Python object allocation via compiler.parse()
>
> I've hacked together a demo which includes everything necessary to
> demonstrate this.
>
> It breaks ansi wxPython 2.6.1.0 and 2.6.2.1 on Python 2.3.3 and Python
> 2.4.2 on Windows 2000. I've not tried unicode wxPython, but I wouldn't
> imagine it would fare any better.
>
> Can anyone verify if this does/does not break on their platform? You
> may need to adjust the value of FC on the second line of smackgui2.py if
> your platform is significantly slower or faster than a 2.8 ghz P4 (it's
> the delay between style changes).
>
>
> Behavior I have observed after the button has been pushed:
> 1. Fatal Python error: GC object already tracked
> 2. Everything works fine, but closing the program never returns you to
> the command prompt.
> 3. ''"The instruction at "..." referenced memory at "...". The memory
> could not be "read".'' The first address is obviously an instruction
> address and varies within the binary image, the second address very much
> likes to be 0xFFFFFFXX or 0x000000XX for some 'XX', and tends to vary
> via quantum entanglement with the cat hair in my keyboard, but it has
> been in the image, stack, and heap.
> 4. The application uses as much processor as it can, and becomes
> non-responsive.
> 5. An unbelieveable traceback [1] whereby the two threads seemed to have
> exchanged values (Mainthread got the result of 'len(nodelist') as its
> input for len(val), and Thread-1 got 'val' as an argument to range).
> 6. On occasion, it works for a short period. I can move the window,
> scroll, etc., and it doesn't die...for about 5 seconds.
>
> - Josiah
>
> [1] - (it's not the length, look at the exceptions themselves!)
>
> Traceback (most recent call last):
> File "C:\Python23\lib\site-packages\wx-2.6-msw-ansi\wx\_misc.py", line 1137, in Notify
> self.notify()
> File "C:\Python23\lib\site-packages\wx-2.6-msw-ansi\wx\_core.py", line 13368, in Notify
> self.result = self.callable(*self.args, **self.kwargs)
> File "D:\MYDOCS\Projects\python\smackgui2.py", line 60, in Style
> STCStyleEditor.initSTC(self.stc, config, 'python')
> File "D:\MYDOCS\Projects\python\STCStyleEditor.py", line 1307, in initSTC
> (cfg, commonDefs, styleIdNames, styles, predefStyleGroupNames,
> File "D:\MYDOCS\Projects\python\STCStyleEditor.py", line 1231, in initFromConfig
> if val != groupPrefix and len(val) >= 5 and val[:5] == 'style':
> TypeError: len() of unsized object
> Exception in thread Thread-1:
> Traceback (most recent call last):
> File "C:\Python23\lib\threading.py", line 436, in __bootstrap
> self.run()
> File "C:\Python23\lib\threading.py", line 416, in run
> self.__target(*self.__args, **self.__kwargs)
> File "D:\MYDOCS\Projects\python\smackgui2.py", line 30, in compile
> x = compiler.parse(gs)
> File "C:\python23\lib\compiler\transformer.py", line 50, in parse
> return Transformer().parsesuite(buf)
> File "C:\python23\lib\compiler\transformer.py", line 120, in parsesuite
> return self.transform(parser.suite(text))
> File "C:\python23\lib\compiler\transformer.py", line 113, in transform
> return self.compile_node(tree)
> File "C:\python23\lib\compiler\transformer.py", line 149, in compile_node
> return self.file_input(node[1:])
> File "C:\python23\lib\compiler\transformer.py", line 180, in file_input
> self.com_append_stmt(stmts, node)
> File "C:\python23\lib\compiler\transformer.py", line 1019, in com_append_stmt
> result = self.com_node(node)
> File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
> return self._dispatch[node[0]](node[1:])
> File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
> return self.com_stmt(nodelist[0])
> File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
> result = self.lookup_node(node)(node[1:])
> File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
> return self.com_stmt(nodelist[0])
> File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
> result = self.lookup_node(node)(node[1:])
> File "C:\python23\lib\compiler\transformer.py", line 204, in funcdef
> code = self.com_node(nodelist[4])
> File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
> return self._dispatch[node[0]](node[1:])
> File "C:\python23\lib\compiler\transformer.py", line 519, in suite
> self.com_append_stmt(stmts, node)
> File "C:\python23\lib\compiler\transformer.py", line 1019, in com_append_stmt
> result = self.com_node(node)
> File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
> return self._dispatch[node[0]](node[1:])
> File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
> return self.com_stmt(nodelist[0])
> File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
> result = self.lookup_node(node)(node[1:])
> File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
> return self.com_stmt(nodelist[0])
> File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
> result = self.lookup_node(node)(node[1:])
> File "C:\python23\lib\compiler\transformer.py", line 204, in funcdef
> code = self.com_node(nodelist[4])
> File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
> return self._dispatch[node[0]](node[1:])
> File "C:\python23\lib\compiler\transformer.py", line 519, in suite
> self.com_append_stmt(stmts, node)
> File "C:\python23\lib\compiler\transformer.py", line 1019, in com_append_stmt
> result = self.com_node(node)
> File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
> return self._dispatch[node[0]](node[1:])
> File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
> return self.com_stmt(nodelist[0])
> File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
> result = self.lookup_node(node)(node[1:])
> File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
> return self.com_stmt(nodelist[0])
> File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
> result = self.lookup_node(node)(node[1:])
> File "C:\python23\lib\compiler\transformer.py", line 476, in while_stmt
> bodyNode = self.com_node(nodelist[3])
> File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
> return self._dispatch[node[0]](node[1:])
> File "C:\python23\lib\compiler\transformer.py", line 519, in suite
> self.com_append_stmt(stmts, node)
> File "C:\python23\lib\compiler\transformer.py", line 1019, in com_append_stmt
> result = self.com_node(node)
> File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
> return self._dispatch[node[0]](node[1:])
> File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
> return self.com_stmt(nodelist[0])
> File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
> result = self.lookup_node(node)(node[1:])
> File "C:\python23\lib\compiler\transformer.py", line 262, in simple_stmt
> self.com_append_stmt(stmts, nodelist[i])
> File "C:\python23\lib\compiler\transformer.py", line 1019, in com_append_stmt
> result = self.com_node(node)
> File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
> return self._dispatch[node[0]](node[1:])
> File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
> return self.com_stmt(nodelist[0])
> File "C:\python23\lib\compiler\transformer.py", line 1012, in com_stmt
> result = self.lookup_node(node)(node[1:])
> File "C:\python23\lib\compiler\transformer.py", line 300, in expr_stmt
> exprNode = self.lookup_node(en)(en[1:])
> File "C:\python23\lib\compiler\transformer.py", line 531, in testlist
> return self.com_binary(Tuple, nodelist)
> File "C:\python23\lib\compiler\transformer.py", line 1004, in com_binary
> return self.lookup_node(n)(n[1:])
> File "C:\python23\lib\compiler\transformer.py", line 541, in test
> return self.com_binary(Or, nodelist)
> File "C:\python23\lib\compiler\transformer.py", line 1004, in com_binary
> return self.lookup_node(n)(n[1:])
> File "C:\python23\lib\compiler\transformer.py", line 545, in and_test
> return self.com_binary(And, nodelist)
> File "C:\python23\lib\compiler\transformer.py", line 1004, in com_binary
> return self.lookup_node(n)(n[1:])
> File "C:\python23\lib\compiler\transformer.py", line 549, in not_test
> result = self.com_node(nodelist[-1])
> File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
> return self._dispatch[node[0]](node[1:])
> File "C:\python23\lib\compiler\transformer.py", line 558, in comparison
> node = self.com_node(nodelist[0])
> File "C:\python23\lib\compiler\transformer.py", line 762, in com_node
> return self._dispatch[node[0]](node[1:])
> File "C:\python23\lib\compiler\transformer.py", line 593, in expr
> return self.com_binary(Bitor, nodelist)
> File "C:\python23\lib\compiler\transformer.py", line 1004, in com_binary
> return self.lookup_node(n)(n[1:])
> File "C:\python23\lib\compiler\transformer.py", line 597, in xor_expr
> return self.com_binary(Bitxor, nodelist)
> File "C:\python23\lib\compiler\transformer.py", line 1004, in com_binary
> return self.lookup_node(n)(n[1:])
> File "C:\python23\lib\compiler\transformer.py", line 601, in and_expr
> return self.com_binary(Bitand, nodelist)
> File "C:\python23\lib\compiler\transformer.py", line 1004, in com_binary
> return self.lookup_node(n)(n[1:])
> File "C:\python23\lib\compiler\transformer.py", line 606, in shift_expr
> for i in range(2, len(nodelist), 2):
> TypeError: range() integer end argument expected, got str.
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

I can confirm the problem on a P IV 3.0 GHz HT, 1Gb RAM and python 2.4.2 with wx 2.6.2.1 unicode

as a bonus I get got also:

Unhandled exception in thread started by <bound method Thread.__bootstrap of <Thread(Thread-1, stopped daemon)>>

Traceback (most recent call last):
File “c:\python24\lib\threading.py”, line 462, in __bootstrap
>>self.__stderr, (
File "C:\Python24\Lib\site-packages\wx-2.6-msw-unicode\wx_core.py
", line 7543, in write
if not wx.Thread_IsMain():
AttributeError: ‘NoneType’ object has no attribute ‘Thread_IsMain’

···

On 2/14/06, Josiah Carlson jcarlson@uci.edu wrote:

Vyacheslav Sotnikov <
bsdforfree@rambler.ru> wrote:

Hello. It is not breaks when i starting app. I’m using FreeBSD6 with
python 2.4.2 and wxPython-2.6.1.0-unicode and wxGTK 2.6.2.

It shouldn’t break when it just starts up, but if it is using more than
50% of your processor, you should increase the FC value until it runs
with around 30-40% of your processor.

So, i’m leave default FC value (of 100) and click ‘Start threads’. It

worked well. But when i tryed to close the app - it seems like hang on.
So i shutdown it with ^c. And yes, application works too slow on my
machine - p3-700/256RAM

What versions of wxPython and Python are you using? Anyone else have

this problem on a fast machine?

  • Josiah

Josiah Carlson wrote:

Hey Robin (and everyone else),

I’ve once again wandered into a Python garbage collection issue that

fairly reliably kills a wxPython application.

main thread:
repeated STC style changes via STCStyleEditor,
which uses wxFileConfig

second thread:

heavy C-level Python object allocation via compiler.parse()

I’ve hacked together a demo which includes everything necessary to
demonstrate this.

It breaks ansi wxPython 2.6.1.0 and 2.6.2.1 on Python 2.3.3 and Python
2.4.2 on Windows 2000. I’ve not tried unicode wxPython, but I wouldn’t
imagine it would fare any better.

Can anyone verify if this does/does not break on their platform? You
may need to adjust the value of FC on the second line of smackgui2.py if
your platform is significantly slower or faster than a 2.8 ghz P4 (it’s
the delay between style changes).

Behavior I have observed after the button has been pushed:

  1. Fatal Python error: GC object already tracked
  1. Everything works fine, but closing the program never returns you to
    the command prompt.
  2. ‘’"The instruction at “…” referenced memory at “…”. The memory

could not be “read”.‘’ The first address is obviously an instruction
address and varies within the binary image, the second address very much
likes to be 0xFFFFFFXX or 0x000000XX for some ‘XX’, and tends to vary

via quantum entanglement with the cat hair in my keyboard, but it has
been in the image, stack, and heap.
4. The application uses as much processor as it can, and becomes
non-responsive.

  1. An unbelieveable traceback [1] whereby the two threads seemed to have
    exchanged values (Mainthread got the result of ‘len(nodelist’) as its
    input for len(val), and Thread-1 got ‘val’ as an argument to range).
  1. On occasion, it works for a short period. I can move the window,
    scroll, etc., and it doesn’t die…for about 5 seconds.
  • Josiah

[1] - (it’s not the length, look at the exceptions themselves!)

Traceback (most recent call last):
File “C:\Python23\lib\site-packages\wx-2.6-msw-ansi\wx_misc.py”, line 1137, in Notify
self.notify()
File “C:\Python23\lib\site-packages\wx-
2.6-msw-ansi\wx_core.py”, line 13368, in Notify
self.result = self.callable(*self.args, **self.kwargs)
File “D:\MYDOCS\Projects\python\smackgui2.py”, line 60, in Style
STCStyleEditor.initSTC(self.stc, config, ‘python’)
File “D:\MYDOCS\Projects\python\STCStyleEditor.py”, line 1307, in initSTC
(cfg, commonDefs, styleIdNames, styles, predefStyleGroupNames,

File “D:\MYDOCS\Projects\python\STCStyleEditor.py”, line 1231, in initFromConfig
if val != groupPrefix and len(val) >= 5 and val[:5] == ‘style’:
TypeError: len() of unsized object

Exception in thread Thread-1:
Traceback (most recent call last):
File “C:\Python23\lib\threading.py”, line 436, in __bootstrap
self.run()
File “C:\Python23\lib\threading.py”, line 416, in run

self.__target(*self.__args, **self.__kwargs)

File “D:\MYDOCS\Projects\python\smackgui2.py”, line 30, in compile
x = compiler.parse(gs)
File “C:\python23\lib\compiler\transformer.py”, line 50, in parse

return Transformer().parsesuite(buf)

File “C:\python23\lib\compiler\transformer.py”, line 120, in parsesuite
return self.transform(parser.suite(text))
File “C:\python23\lib\compiler\transformer.py”, line 113, in transform

return self.compile_node(tree)

File “C:\python23\lib\compiler\transformer.py”, line 149, in compile_node
return self.file_input(node[1:])
File “C:\python23\lib\compiler\transformer.py”, line 180, in file_input

self.com_append_stmt(stmts, node)

File “C:\python23\lib\compiler\transformer.py”, line 1019, in com_append_stmt
result = self.com_node(node)
File “C:\python23\lib\compiler\transformer.py”, line 762, in com_node

return self._dispatch[node[0]](node[1:])

File “C:\python23\lib\compiler\transformer.py”, line 252, in stmt
return self.com_stmt(nodelist[0])
File “C:\python23\lib\compiler\transformer.py”, line 1012, in com_stmt

result = self.lookup_node(node)(node[1:])

File “C:\python23\lib\compiler\transformer.py”, line 252, in stmt
return self.com_stmt(nodelist[0])
File “C:\python23\lib\compiler\transformer.py”, line 1012, in com_stmt

result = self.lookup_node(node)(node[1:])

File “C:\python23\lib\compiler\transformer.py”, line 204, in funcdef
code = self.com_node(nodelist[4])
File “C:\python23\lib\compiler\transformer.py”, line 762, in com_node

return self._dispatch[node[0]](node[1:])

File “C:\python23\lib\compiler\transformer.py”, line 519, in suite
self.com_append_stmt(stmts, node)
File “C:\python23\lib\compiler\transformer.py”, line 1019, in com_append_stmt

result = self.com_node(node)

File “C:\python23\lib\compiler\transformer.py”, line 762, in com_node
return self._dispatchnode[0]
File “C:\python23\lib\compiler\transformer.py”, line 252, in stmt

return self.com_stmt(nodelist[0])

File “C:\python23\lib\compiler\transformer.py”, line 1012, in com_stmt
result = self.lookup_node(node)(node[1:])
File “C:\python23\lib\compiler\transformer.py”, line 252, in stmt

return self.com_stmt(nodelist[0])

File “C:\python23\lib\compiler\transformer.py”, line 1012, in com_stmt
result = self.lookup_node(node)(node[1:])
File “C:\python23\lib\compiler\transformer.py”, line 204, in funcdef

code = self.com_node(nodelist[4])

File “C:\python23\lib\compiler\transformer.py”, line 762, in com_node
return self._dispatchnode[0]
File “C:\python23\lib\compiler\transformer.py”, line 519, in suite

self.com_append_stmt(stmts, node)

File “C:\python23\lib\compiler\transformer.py”, line 1019, in com_append_stmt
result = self.com_node(node)
File “C:\python23\lib\compiler\transformer.py”, line 762, in com_node

return self._dispatch[node[0]](node[1:])

File “C:\python23\lib\compiler\transformer.py”, line 252, in stmt
return self.com_stmt(nodelist[0])
File “C:\python23\lib\compiler\transformer.py”, line 1012, in com_stmt

result = self.lookup_node(node)(node[1:])

File “C:\python23\lib\compiler\transformer.py”, line 252, in stmt
return self.com_stmt(nodelist[0])
File “C:\python23\lib\compiler\transformer.py”, line 1012, in com_stmt

result = self.lookup_node(node)(node[1:])

File “C:\python23\lib\compiler\transformer.py”, line 476, in while_stmt
bodyNode = self.com_node(nodelist[3])
File “C:\python23\lib\compiler\transformer.py”, line 762, in com_node

return self._dispatch[node[0]](node[1:])

File “C:\python23\lib\compiler\transformer.py”, line 519, in suite
self.com_append_stmt(stmts, node)
File “C:\python23\lib\compiler\transformer.py”, line 1019, in com_append_stmt

result = self.com_node(node)

File “C:\python23\lib\compiler\transformer.py”, line 762, in com_node
return self._dispatchnode[0]
File “C:\python23\lib\compiler\transformer.py”, line 252, in stmt

return self.com_stmt(nodelist[0])

File “C:\python23\lib\compiler\transformer.py”, line 1012, in com_stmt
result = self.lookup_node(node)(node[1:])
File “C:\python23\lib\compiler\transformer.py”, line 262, in simple_stmt

self.com_append_stmt(stmts, nodelist[i])

File “C:\python23\lib\compiler\transformer.py”, line 1019, in com_append_stmt
result = self.com_node(node)
File “C:\python23\lib\compiler\transformer.py”, line 762, in com_node

return self._dispatch[node[0]](node[1:])

File “C:\python23\lib\compiler\transformer.py”, line 252, in stmt
return self.com_stmt(nodelist[0])
File “C:\python23\lib\compiler\transformer.py”, line 1012, in com_stmt

result = self.lookup_node(node)(node[1:])

File “C:\python23\lib\compiler\transformer.py”, line 300, in expr_stmt
exprNode = self.lookup_node(en)(en[1:])
File “C:\python23\lib\compiler\transformer.py”, line 531, in testlist

return self.com_binary(Tuple, nodelist)

File “C:\python23\lib\compiler\transformer.py”, line 1004, in com_binary
return self.lookup_node(n)(n[1:])
File “C:\python23\lib\compiler\transformer.py”, line 541, in test

return self.com_binary(Or, nodelist)

File “C:\python23\lib\compiler\transformer.py”, line 1004, in com_binary
return self.lookup_node(n)(n[1:])
File “C:\python23\lib\compiler\transformer.py”, line 545, in and_test

return self.com_binary(And, nodelist)

File “C:\python23\lib\compiler\transformer.py”, line 1004, in com_binary
return self.lookup_node(n)(n[1:])
File “C:\python23\lib\compiler\transformer.py”, line 549, in not_test

result = self.com_node(nodelist[-1])

File “C:\python23\lib\compiler\transformer.py”, line 762, in com_node
return self._dispatchnode[0]
File “C:\python23\lib\compiler\transformer.py”, line 558, in comparison

node = self.com_node(nodelist[0])

File “C:\python23\lib\compiler\transformer.py”, line 762, in com_node
return self._dispatchnode[0]
File “C:\python23\lib\compiler\transformer.py”, line 593, in expr

return self.com_binary(Bitor, nodelist)

File “C:\python23\lib\compiler\transformer.py”, line 1004, in com_binary
return self.lookup_node(n)(n[1:])
File “C:\python23\lib\compiler\transformer.py”, line 597, in xor_expr

return self.com_binary(Bitxor, nodelist)

File “C:\python23\lib\compiler\transformer.py”, line 1004, in com_binary
return self.lookup_node(n)(n[1:])
File “C:\python23\lib\compiler\transformer.py”, line 601, in and_expr

return self.com_binary(Bitand, nodelist)

File “C:\python23\lib\compiler\transformer.py”, line 1004, in com_binary
return self.lookup_node(n)(n[1:])
File “C:\python23\lib\compiler\transformer.py”, line 606, in shift_expr

for i in range(2, len(nodelist), 2):

TypeError: range() integer end argument expected, got str.



To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org

For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org


To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail:
wxPython-users-help@lists.wxwidgets.org


To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org

For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

I can confirm the problem on a P IV 3.0 GHz HT, 1Gb RAM and python 2.4.2with wx
2.6.2.1 unicode

See, I'm not crazy!

as a bonus I get got also:

Unhandled exception in thread started by <bound method Thread.__bootstrap of
<Thread(Thread-1, stopped daemon)>>
Traceback (most recent call last):
  File "c:\python24\lib\threading.py", line 462, in __bootstrap
    >>self.__stderr, (
  File "C:\Python24\Lib\site-packages\wx-2.6-msw-unicode\wx\_core.py", line
7543, in write
    if not wx.Thread_IsMain():
AttributeError: 'NoneType' object has no attribute 'Thread_IsMain'

Did you get that one on close? That's when I get it.

I've been mucking about a bit more. When I replace the
STCStyleEditor.initSTC() call with a work-alike module and function,
everything seems to work just fine... The only fundamental difference
with the code that is in use is that the work-alike doesn't use
wx.FileConfig(), which the STCStyleEditor uses to parse the
configuration file. Maybe wx.FileConfig() is doing something strange?

- Josiah

···

Peter Damoc <pdamoc@gmail.com> wrote:

On 2/14/06, Josiah Carlson <jcarlson@uci.edu> wrote:
>
>
> Vyacheslav Sotnikov <bsdforfree@rambler.ru> wrote:
> > Hello. It is not breaks when i starting app. I'm using FreeBSD6 with
> > python 2.4.2 and wxPython-2.6.1.0-unicode and wxGTK 2.6.2.
>
> It shouldn't break when it just starts up, but if it is using more than
> 50% of your processor, you should increase the FC value until it runs
> with around 30-40% of your processor.
>
> > So, i'm leave default FC value (of 100) and click 'Start threads'. It
> > worked well. But when i tryed to close the app - it seems like hang on.
> > So i shutdown it with ^c. And yes, application works too slow on my
> > machine - p3-700/256RAM
>
> What versions of wxPython and Python are you using? Anyone else have
> this problem on a fast machine?
>
> - Josiah
>
> > Josiah Carlson wrote:
> > > Hey Robin (and everyone else),
> > >
> > > I've once again wandered into a Python garbage collection issue that
> > > fairly reliably kills a wxPython application.
> > >
> > > main thread:
> > > repeated STC style changes via STCStyleEditor,
> > > which uses wxFileConfig
> > >
> > > second thread:
> > > heavy C-level Python object allocation via compiler.parse()
> > >
> > > I've hacked together a demo which includes everything necessary to
> > > demonstrate this.
> > >
> > > It breaks ansi wxPython 2.6.1.0 and 2.6.2.1 on Python 2.3.3 and Python
> > > 2.4.2 on Windows 2000. I've not tried unicode wxPython, but I
> wouldn't
> > > imagine it would fare any better.
> > >
> > > Can anyone verify if this does/does not break on their platform? You
> > > may need to adjust the value of FC on the second line of smackgui2.pyif
> > > your platform is significantly slower or faster than a 2.8 ghz P4
> (it's
> > > the delay between style changes).
> > >
> > >
> > > Behavior I have observed after the button has been pushed:
> > > 1. Fatal Python error: GC object already tracked
> > > 2. Everything works fine, but closing the program never returns you to
> > > the command prompt.
> > > 3. ''"The instruction at "..." referenced memory at "...". The memory
> > > could not be "read".'' The first address is obviously an instruction
> > > address and varies within the binary image, the second address very
> much
> > > likes to be 0xFFFFFFXX or 0x000000XX for some 'XX', and tends to vary
> > > via quantum entanglement with the cat hair in my keyboard, but it has
> > > been in the image, stack, and heap.
> > > 4. The application uses as much processor as it can, and becomes
> > > non-responsive.
> > > 5. An unbelieveable traceback [1] whereby the two threads seemed to
> have
> > > exchanged values (Mainthread got the result of 'len(nodelist') as its
> > > input for len(val), and Thread-1 got 'val' as an argument to range).
> > > 6. On occasion, it works for a short period. I can move the window,
> > > scroll, etc., and it doesn't die...for about 5 seconds.
> > >
> > > - Josiah
> > >
> > > [1] - (it's not the length, look at the exceptions themselves!)
> > >
> > > Traceback (most recent call last):
> > > File "C:\Python23\lib\site-packages\wx-2.6-msw-ansi\wx\_misc.py",
> line 1137, in Notify
> > > self.notify()
> > > File "C:\Python23\lib\site-packages\wx-2.6-msw-ansi\wx\_core.py",
> line 13368, in Notify
> > > self.result = self.callable(*self.args, **self.kwargs)
> > > File "D:\MYDOCS\Projects\python\smackgui2.py", line 60, in Style
> > > STCStyleEditor.initSTC(self.stc, config, 'python')
> > > File "D:\MYDOCS\Projects\python\STCStyleEditor.py", line 1307, in
> initSTC
> > > (cfg, commonDefs, styleIdNames, styles, predefStyleGroupNames,
> > > File "D:\MYDOCS\Projects\python\STCStyleEditor.py", line 1231, in
> initFromConfig
> > > if val != groupPrefix and len(val) >= 5 and val[:5] == 'style':
> > > TypeError: len() of unsized object
> > > Exception in thread Thread-1:
> > > Traceback (most recent call last):
> > > File "C:\Python23\lib\threading.py", line 436, in __bootstrap
> > > self.run()
> > > File "C:\Python23\lib\threading.py", line 416, in run
> > > self.__target(*self.__args, **self.__kwargs)
> > > File "D:\MYDOCS\Projects\python\smackgui2.py", line 30, in compile
> > > x = compiler.parse(gs)
> > > File "C:\python23\lib\compiler\transformer.py", line 50, in parse
> > > return Transformer().parsesuite(buf)
> > > File "C:\python23\lib\compiler\transformer.py", line 120, in
> parsesuite
> > > return self.transform(parser.suite(text))
> > > File "C:\python23\lib\compiler\transformer.py", line 113, in
> transform
> > > return self.compile_node(tree)
> > > File "C:\python23\lib\compiler\transformer.py", line 149, in
> compile_node
> > > return self.file_input(node[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 180, in
> file_input
> > > self.com_append_stmt(stmts, node)
> > > File "C:\python23\lib\compiler\transformer.py", line 1019, in
> com_append_stmt
> > > result = self.com_node(node)
> > > File "C:\python23\lib\compiler\transformer.py", line 762, in
> com_node
> > > return self._dispatch[node[0]](node[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
> > > return self.com_stmt(nodelist[0])
> > > File "C:\python23\lib\compiler\transformer.py", line 1012, in
> com_stmt
> > > result = self.lookup_node(node)(node[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
> > > return self.com_stmt(nodelist[0])
> > > File "C:\python23\lib\compiler\transformer.py", line 1012, in
> com_stmt
> > > result = self.lookup_node(node)(node[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 204, in funcdef
> > > code = self.com_node(nodelist[4])
> > > File "C:\python23\lib\compiler\transformer.py", line 762, in
> com_node
> > > return self._dispatch[node[0]](node[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 519, in suite
> > > self.com_append_stmt(stmts, node)
> > > File "C:\python23\lib\compiler\transformer.py", line 1019, in
> com_append_stmt
> > > result = self.com_node(node)
> > > File "C:\python23\lib\compiler\transformer.py", line 762, in
> com_node
> > > return self._dispatch[node[0]](node[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
> > > return self.com_stmt(nodelist[0])
> > > File "C:\python23\lib\compiler\transformer.py", line 1012, in
> com_stmt
> > > result = self.lookup_node(node)(node[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
> > > return self.com_stmt(nodelist[0])
> > > File "C:\python23\lib\compiler\transformer.py", line 1012, in
> com_stmt
> > > result = self.lookup_node(node)(node[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 204, in funcdef
> > > code = self.com_node(nodelist[4])
> > > File "C:\python23\lib\compiler\transformer.py", line 762, in
> com_node
> > > return self._dispatch[node[0]](node[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 519, in suite
> > > self.com_append_stmt(stmts, node)
> > > File "C:\python23\lib\compiler\transformer.py", line 1019, in
> com_append_stmt
> > > result = self.com_node(node)
> > > File "C:\python23\lib\compiler\transformer.py", line 762, in
> com_node
> > > return self._dispatch[node[0]](node[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
> > > return self.com_stmt(nodelist[0])
> > > File "C:\python23\lib\compiler\transformer.py", line 1012, in
> com_stmt
> > > result = self.lookup_node(node)(node[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
> > > return self.com_stmt(nodelist[0])
> > > File "C:\python23\lib\compiler\transformer.py", line 1012, in
> com_stmt
> > > result = self.lookup_node(node)(node[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 476, in
> while_stmt
> > > bodyNode = self.com_node(nodelist[3])
> > > File "C:\python23\lib\compiler\transformer.py", line 762, in
> com_node
> > > return self._dispatch[node[0]](node[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 519, in suite
> > > self.com_append_stmt(stmts, node)
> > > File "C:\python23\lib\compiler\transformer.py", line 1019, in
> com_append_stmt
> > > result = self.com_node(node)
> > > File "C:\python23\lib\compiler\transformer.py", line 762, in
> com_node
> > > return self._dispatch[node[0]](node[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
> > > return self.com_stmt(nodelist[0])
> > > File "C:\python23\lib\compiler\transformer.py", line 1012, in
> com_stmt
> > > result = self.lookup_node(node)(node[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 262, in
> simple_stmt
> > > self.com_append_stmt(stmts, nodelist[i])
> > > File "C:\python23\lib\compiler\transformer.py", line 1019, in
> com_append_stmt
> > > result = self.com_node(node)
> > > File "C:\python23\lib\compiler\transformer.py", line 762, in
> com_node
> > > return self._dispatch[node[0]](node[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 252, in stmt
> > > return self.com_stmt(nodelist[0])
> > > File "C:\python23\lib\compiler\transformer.py", line 1012, in
> com_stmt
> > > result = self.lookup_node(node)(node[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 300, in
> expr_stmt
> > > exprNode = self.lookup_node(en)(en[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 531, in
> testlist
> > > return self.com_binary(Tuple, nodelist)
> > > File "C:\python23\lib\compiler\transformer.py", line 1004, in
> com_binary
> > > return self.lookup_node(n)(n[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 541, in test
> > > return self.com_binary(Or, nodelist)
> > > File "C:\python23\lib\compiler\transformer.py", line 1004, in
> com_binary
> > > return self.lookup_node(n)(n[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 545, in
> and_test
> > > return self.com_binary(And, nodelist)
> > > File "C:\python23\lib\compiler\transformer.py", line 1004, in
> com_binary
> > > return self.lookup_node(n)(n[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 549, in
> not_test
> > > result = self.com_node(nodelist[-1])
> > > File "C:\python23\lib\compiler\transformer.py", line 762, in
> com_node
> > > return self._dispatch[node[0]](node[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 558, in
> comparison
> > > node = self.com_node(nodelist[0])
> > > File "C:\python23\lib\compiler\transformer.py", line 762, in
> com_node
> > > return self._dispatch[node[0]](node[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 593, in expr
> > > return self.com_binary(Bitor, nodelist)
> > > File "C:\python23\lib\compiler\transformer.py", line 1004, in
> com_binary
> > > return self.lookup_node(n)(n[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 597, in
> xor_expr
> > > return self.com_binary(Bitxor, nodelist)
> > > File "C:\python23\lib\compiler\transformer.py", line 1004, in
> com_binary
> > > return self.lookup_node(n)(n[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 601, in
> and_expr
> > > return self.com_binary(Bitand, nodelist)
> > > File "C:\python23\lib\compiler\transformer.py", line 1004, in
> com_binary
> > > return self.lookup_node(n)(n[1:])
> > > File "C:\python23\lib\compiler\transformer.py", line 606, in
> shift_expr
> > > for i in range(2, len(nodelist), 2):
> > > TypeError: range() integer end argument expected, got str.
> > >
> > >
> > >
> ------------------------------------------------------------------------
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
> > > For additional commands, e-mail:
> wxPython-users-help@lists.wxwidgets.org
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
> > For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
> For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org
>
>