def getwh(event):
wh=room.whname.get(room.whname.curselection())
room.cNewRoM['text']=wh
return wh
if getwh(1) in ['东墙(门窗)','西墙(门窗)','南墙(门窗)','北墙(门窗)']:
Qmc=(gettn(1)-int(tw)*int(Fmc)*geta(0)*Kmc) #Q1=(tn-tw)*F*a*K
报错如下:
wh=room.whname.get(room.whname.curselection())
File "C:\Users\AI\Anaconda3\lib\tkinter\__init__.py", line 2798, in get
return self.tk.call(self._w, 'get', first)
TclError: bad listbox index "": must be active, anchor, end, @x,y, or a number
请问各位大佬问题出在哪了?