-2
该变量显然未定义,尽管它已被使用。代码是hereNameError:name'questionTextOne'未定义
正如你所看到的,我试图将变量声明为全局变量。
完整的错误:
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Users\matth\AppData\Local\Programs\Python\Python35-32\lib\tkinter\__init__.py", line 1550, in __call__
return self.func(*args)
File "C:\Users\matth\OneDrive\Documents\Assesment.py", line 145, in incorrect
unpackOne()
File "C:\Users\matth\OneDrive\Documents\Assesment.py", line 173, in unpackOne
questionTextOne.pack_forget()
NameError: name 'questionTextOne' is not defined
在外部范围内没有'questionTextOne'对象 –
也提供[mcve](https://stackoverflow.com/help/mcve),并非所有的项目代码 –
请不要链接到外部的代码现场。 –