Why my code raise a error about 'NameError: name 'size' is not defined' when I run 'python main.py', how can i resolute ?