Python Tkinter Attribute Error -


i have made tkinter program keep getting error:

file "f:\programming 2\gui\gui #11.py", line 78, in shape_workit cylinder(pos=(0,0,0),axis=(1,0,0),color=self.color3.get(),  attributeerror: 'kinter' object has no attribute 'color3' 

here code error occurs from:

def shapescolor(self):     if self.color1.get()=="does orange":         color3=color.orange     if self.color1.get()=="does blue":         color3=color.blue def shape_workit(self):       try:         if self.shape.get()=="does cylinder":                         #creates cylinder             cylinder(pos=(0,0,0),axis=(1,0,0),color=self.color3.get() ##error here,                      radius=float(self.radius.get())) 

here code error gets from

my guess need doing self.color3 = ... rather color3 = ..., since you're later refering self.color3 , haven't set attribute anywhere else in code posted.


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -