When I start the GUI, the console is full of warnings such as 'int' object is not subscriptable. The first commit in this PR shows where that is coming from. The self.center value is -1, and the first time the code proceeds, it tries to access self.center[...] resulting in that error.
The second error, that happens with less frequency, is 'Shape' object has no attribute 'standard_corners'. It appears that standard_corners, area, and other attributes are initialized in the reset - or in other functions - but are used before the reset initializes the attributes.
Resulting in no attribute error. The fix in this PR removes the error from the log, but that's most likely not the right solution. Feel free to close this PR if there's another solution in progress (cc @cfculhane you said you are refactoring some of the code?).
Hi!
When I start the GUI, the console is full of warnings such as
'int' object is not subscriptable
. The first commit in this PR shows where that is coming from. Theself.center
value is-1
, and the first time the code proceeds, it tries to accessself.center[...]
resulting in that error.The second error, that happens with less frequency, is
'Shape' object has no attribute 'standard_corners'
. It appears thatstandard_corners
,area
, and other attributes are initialized in thereset
- or in other functions - but are used before thereset
initializes the attributes.Resulting in
no attribute
error. The fix in this PR removes the error from the log, but that's most likely not the right solution. Feel free to close this PR if there's another solution in progress (cc @cfculhane you said you are refactoring some of the code?).