Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 3.x _tkinter.TclError:无效的命令名";。!“文本”;_Python 3.x_Tkinter - Fatal编程技术网

Python 3.x _tkinter.TclError:无效的命令名";。!“文本”;

Python 3.x _tkinter.TclError:无效的命令名";。!“文本”;,python-3.x,tkinter,Python 3.x,Tkinter,我正在使用tkinter制作一个程序,它执行来自不同文件的一些代码 这是我的代码中导致问题的部分: text=textbox.get('1.0','end-1c')) 仅供参考:textbox是一个tkinter.Text对象,由代码执行的不同文件定义 每当我执行代码时,都会出现以下错误: Exception in Tkinter callback Traceback (most recent call last): File "/anaconda3/lib/python3.7/tkint

我正在使用tkinter制作一个程序,它执行来自不同文件的一些代码

这是我的代码中导致问题的部分:

text=textbox.get('1.0','end-1c'))
仅供参考:
textbox
是一个tkinter.Text对象,由代码执行的不同文件定义

每当我执行代码时,都会出现以下错误:

Exception in Tkinter callback
Traceback (most recent call last):
  File "/anaconda3/lib/python3.7/tkinter/__init__.py", line 1705, in __call__
    return self.func(*args)
  File "/Users/iskee/python/programs/atfedit/atf.py", line 98, in save
    text=textbox.get('1.0','end-1c')
  File "/anaconda3/lib/python3.7/tkinter/__init__.py", line 3246, in get
    return self.tk.call(self._w, 'get', index1, index2)
_tkinter.TclError: invalid command name ".!text"

出了什么问题?

该错误意味着您试图访问已销毁的小部件