I ran your code myself, and the second time your program is run, the error is AttributeError: 'module' object has no attribute 'Member'
. You're trying to unpickle your class before it's properly been constructed. To extend on the first comment, putting members
into the class definition is what's making your code fail. Move it below the class definition, and it will work.
class Member:
def __init__(self, name, info, new=True):
...
...
try:
with open('member dict.txt', 'rb') as f:
members = pickle.load(f)
except Exception as e:
members = {}