[New-bugs-announce] [issue30551] Attribute Error

Mahira report at bugs.python.org
Fri Jun 2 07:06:01 EDT 2017


New submission from Mahira:

Hai, I am New to python and I am training with some open source projects now am Practising GUI....
I get the Error Message 
 
Traceback (most recent call last):
  File "C:/Users/Mahira/AppData/Local/Programs/Python/Python36/Lib/graphics_setup/Shape Gra Ex.py", line 6, in <module>
    circle.draw("win")
  File "C:/Users/Mahira/AppData/Local/Programs/Python/Python36/Lib/graphics_setup\graphics.py", line 482, in draw
    if graphwin.isClosed(): raise GraphicsError("Can't draw to closed window")
AttributeError: 'str' object has no attribute 'isClosed'

And my Program is Following below:
from graphics import *
win=GraphWin('Shapes')
center=Point(100,100)
circle=Circle(center,30)
circle.setFill('red')
circle.draw("win")
label=Text(center,"Red Circle")
label.draw(win)
rect=Rectangle(Point(30,30),Point(70,70))
r.draw(win)
line=Line(Point(20,30),Point(180,199))
line.draw(win)
oval=Oval(Point(20,150),Point(180,199))
oval.draw(win)

----------
messages: 295004
nosy: Mahira
priority: normal
severity: normal
status: open
title: Attribute Error
type: compile error
versions: Python 3.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue30551>
_______________________________________


More information about the New-bugs-announce mailing list