Python attributeError on __del__
Your __del__ method assumes that the class is still present by the time it is called. This assumption is incorrect. Groupclass has already been cleared when your Python program exits and is now set to None. Test if the global reference to the class still exists first: def __del__(self): if Groupclass: Groupclass.count -= 1 or … Read more