Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #69076
| From | Peter Otten <__peter__@web.de> |
|---|---|
| Subject | Re: Errors on text.get() |
| Date | 2014-03-25 22:39 +0100 |
| Organization | None |
| References | <7548537d-7aee-4404-98b3-8b5ce294d971@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.8544.1395783574.18130.python-list@python.org> (permalink) |
eneskristo@gmail.com wrote:
> Exception in Tkinter callback
> Traceback (most recent call last):
> File "C:\Python33\lib\tkinter\__init__.py", line 1475, in __call__
> return self.func(*args)
> File "C:/Users/User/PycharmProjects/Cesarian Codes/project.py", line 43,
> in gen_random
> string = text.get('1.0', 'end')
> File "C:\Python33\lib\tkinter\__init__.py", line 3104, in get
> return self.tk.call(self._w, 'get', index1, index2)
> _tkinter.TclError: invalid command name ".44500976.44544352"
>
> I'm having a strange error. I haven't found anything online so far. If I
> should supply parts of the code, please post here. Thank you in advance!
Once you have destroyed a widget you can no longer access its data:
>>> import tkinter as tk
>>> root = tk.Tk()
>>> text = tk.Text(root)
>>> text.pack()
>>> text.get("1.0", "end")
'\n'
>>> text.destroy()
>>> text.get("1.0", "end")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.3/tkinter/__init__.py", line 3107, in get
return self.tk.call(self._w, 'get', index1, index2)
_tkinter.TclError: invalid command name ".140692133333008"
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Errors on text.get() eneskristo@gmail.com - 2014-03-25 14:15 -0700 Re: Errors on text.get() Peter Otten <__peter__@web.de> - 2014-03-25 22:39 +0100 Re: Errors on text.get() eneskristo@gmail.com - 2014-03-26 07:31 -0700
csiph-web