ab22a36910
fixed space
8312cfc944
fixed incorrect attribute assignment
Attribute Error in Circles due to mislabeling
NameError for Line attribute 'rise'
Turns out the problem was in both 'rise' and 'run'. As I got this too:
Python 3.8.2 (default, Apr 27 2020, 15:53:34)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from gasp import *
>>> begin_graphics()
>>> Line((100,100),(200,200))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/mdnabiltech/Projects/GASP/GASP_Tkinter/gasp/gasp.py", line 162, in __repr__
f"<Line object from ({self.pos[0]}, {self.pos[1]})>"
NameError: name 'run' is not defined
I looked in the gasp.py file and I fixed it with a quick fix of just adding 'self.' to the start of the attributes.
The correct code for line 163 is:
f" to ({self.pos[0] + self.rise}, {self.pos[1] - self.run})>"
as opposed to:
f" to ({self.pos[0] + rise}, {self.pos[1] - run})>"
NameError for Line attribute 'rise'
Cannot create Box