[Tutor] Rather vague questions.... (Tkinter)

Glen Wheeler wheelege@tsn.cc
Wed, 14 Feb 2001 21:55:57 +1100


This is a multi-part message in MIME format.

------=_NextPart_000_00AF_01C096D0.E9474560
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

  Hi all,

  I have gotten this error, while running a little python program I am =
creating as a project.  Here is the error :

Traceback (most recent call last):
  File "C:\WINDOWS\Profiles\Glen\Desktop\etc\pystuff\the bouncy ball =
game.py", line 264, in gogamego
    Screen.coords(ballphys, Ball.x1, Ball.y1, Ball.x2, Ball.y2) #the =
reassigning of the ball's coords
  File "c:\python20\lib\lib-tk\Tkinter.py", line 1929, in coords
    self.tk.splitlist(
TclError: invalid command name ".22703164"

  It's an error which pops up in the interactive window every time the =
program quits.  It could have something to do with the thread still =
running and thus losing all the objects it was referencing - but I don't =
know enough about the error messages to tell if this is the case.
  Sometimes (damn intermittent errors) the main thread of the program =
quits (I think...I should probably trap the exit() call...) for no =
reason.  I am hoping that it has something to do with this error.  It =
seems the faster I make the thread run the sooner it quits, and I can =
almost get it to quit every single time I run it at a fast speed (with a =
0.0025 second delay between each iteration) it breaks every time.  When =
it does this, it shows a different error to the one above, it shows this =
one :

Traceback (most recent call last):
  File "C:\WINDOWS\Profiles\Glen\Desktop\etc\pystuff\the bouncy ball =
game.py", line 265, in gogamego
    Screen.coords(ballphys, Ball.x1, Ball.y1, Ball.x2, Ball.y2) ## the =
reassigning of the ball's coords
  File "c:\python20\lib\lib-tk\Tkinter.py", line 1929, in coords
    self.tk.splitlist(
ValueError: invalid literal for float(): expected

  I'm running an Athlon 600mhz system, 256mb ram and windows 98.  I know =
threads aren't all that great in windows...but I seriously need them.  =
The program will be an arkanoid type game (use a paddle to bounce a ball =
and smash blocks) when I'm finished.  Which will be a long time :)
  I'd rather not post the code because it is in super early newbie alpha =
stage and not worth showing to my Mum :)  But of course I will if I have =
to.

  Thanks,
  Glen.

------=_NextPart_000_00AF_01C096D0.E9474560
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4134.600" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV>&nbsp; Hi all,</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; I have gotten this error, while running a little python =
program I am=20
creating as a project.&nbsp; Here is the error :</DIV>
<DIV>&nbsp;</DIV>
<DIV>Traceback (most recent call last):<BR>&nbsp; File=20
"C:\WINDOWS\Profiles\Glen\Desktop\etc\pystuff\the bouncy ball game.py", =
line=20
264, in gogamego<BR>&nbsp;&nbsp;&nbsp; Screen.coords(ballphys, Ball.x1, =
Ball.y1,=20
Ball.x2, Ball.y2) #the reassigning of the ball's coords<BR>&nbsp; File=20
"c:\python20\lib\lib-tk\Tkinter.py", line 1929, in =
coords<BR>&nbsp;&nbsp;&nbsp;=20
self.tk.splitlist(<BR>TclError: invalid command name ".22703164"</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; It's an error which pops up in the interactive window every =
time the=20
program quits.&nbsp; It could have something to do with the thread still =
running=20
and thus losing all the objects it was referencing - but I don't know =
enough=20
about the error messages to tell if this is the case.</DIV>
<DIV>&nbsp; Sometimes (damn intermittent errors) the main thread of the =
program=20
quits (I think...I should probably trap the exit() call...) for no =
reason.&nbsp;=20
I am hoping that it has something to do with this error.&nbsp; It seems =
the=20
faster I make the thread run the sooner it quits, and I can almost get =
it to=20
quit every single time I run it at a fast speed (with a 0.0025 second =
delay=20
between each iteration) it breaks every time.&nbsp; When it does this, =
it shows=20
a different error to the one above, it shows this one :</DIV>
<DIV>&nbsp;</DIV>
<DIV>Traceback (most recent call last):<BR>&nbsp; File=20
"C:\WINDOWS\Profiles\Glen\Desktop\etc\pystuff\the bouncy ball game.py", =
line=20
265, in gogamego<BR>&nbsp;&nbsp;&nbsp; Screen.coords(ballphys, Ball.x1, =
Ball.y1,=20
Ball.x2, Ball.y2) ## the reassigning of the ball's coords<BR>&nbsp; File =

"c:\python20\lib\lib-tk\Tkinter.py", line 1929, in =
coords<BR>&nbsp;&nbsp;&nbsp;=20
self.tk.splitlist(<BR>ValueError: invalid literal for float():=20
expected<BR></DIV>
<DIV>&nbsp; I'm running an Athlon 600mhz system, 256mb ram and windows =
98.&nbsp;=20
I know threads aren't all that great in windows...but I seriously need=20
them.&nbsp; The program will be an arkanoid type game (use a paddle to =
bounce a=20
ball and smash blocks) when I'm finished.&nbsp; Which will be a long =
time=20
:)</DIV>
<DIV>&nbsp; I'd rather not post the code because it is in super early =
newbie=20
alpha stage and not worth showing to my Mum :)&nbsp; But of course I =
will if I=20
have to.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp; Thanks,</DIV>
<DIV>&nbsp; Glen.</DIV></BODY></HTML>

------=_NextPart_000_00AF_01C096D0.E9474560--