[Solved] Don’t understand this “NameError: name ‘self’ is not defined” error [closed]


From the exception it seems that you have tried to call my_wallet.checkBalance passing self as parameter.

Try to do my_wallet.checkBalance() instead of my_wallet.checkBalance(self)

self parameter is passed automatically to class methods in python

11

solved Don’t understand this “NameError: name ‘self’ is not defined” error [closed]