This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author PythonInTheGrass
Recipients PythonInTheGrass, brian.curtin, cgohlke
Date 2011-01-28.14:54:17
SpamBayes Score 2.489675e-13
Marked as misclassified No
Message-id <1296226459.02.0.877442468546.issue11029@psf.upfronthosting.co.za>
In-reply-to
Content
OK, now all calls to Tkinter are funneled to a single thread, through a queue. (Technically there are two threads in Tkinter - one is parked in .mainloop(), the other makes a call to Canvas.create_line and a call to Label.config.) Different crash, but still a crash. This one seems to be mostly consistent; see below and new attached code.

If you're going to tell me that Tkinter simply can never be called by any thread other than the one animating mainloop - in other words, Tkinter calls are only safe within Tkinter callbacks like a Button's command function - then please suggest an alternative library that is sturdier. There's nothing I can do about the fact that multiple threads produce independent data that has to go onto a single graph.

Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 530, in __bootstrap_inner
    self.run()
  File "C:\Documents and Settings\mayos\Desktop\PMT2\MyProjects\TkinterCrash.py", line 68, in run
    self.graph.create_line(element[0], element[1], element[2], element[3])
  File "C:\Python27\lib\lib-tk\Tkinter.py", line 2201, in create_line
    return self._create('line', args, kw)
  File "C:\Python27\lib\lib-tk\Tkinter.py", line 2189, in _create
    *(args + self._options(cnf, kw))))
ValueError: invalid literal for int() with base 10: 'None'

But once I got:

Exception in thread Thread-1:
Traceback (most recent call last):
  File "C:\Python27\lib\threading.py", line 530, in __bootstrap_inner
    self.run()
  File "C:\Documents and Settings\mayos\Desktop\PMT2\MyProjects\TkinterCrash2.py", line 68, in run
    self.graph.create_line(element[0], element[1], element[2], element[3])
  File "C:\Python27\lib\lib-tk\Tkinter.py", line 2201, in create_line
    return self._create('line', args, kw)
  File "C:\Python27\lib\lib-tk\Tkinter.py", line 2189, in _create
    *(args + self._options(cnf, kw))))
TclError: can not find channel named "Nonefile13cad48"
History
Date User Action Args
2011-01-28 14:54:19PythonInTheGrasssetrecipients: + PythonInTheGrass, brian.curtin, cgohlke
2011-01-28 14:54:19PythonInTheGrasssetmessageid: <1296226459.02.0.877442468546.issue11029@psf.upfronthosting.co.za>
2011-01-28 14:54:18PythonInTheGrasslinkissue11029 messages
2011-01-28 14:54:18PythonInTheGrasscreate