'Property' Object Is Not Callable

'Property' Object Is Not Callable

So I have am connecting to a contract, and that seems to work fine, I am trying to use this class: web3.personal.Personal from and I dont seem to understand what i am dong wrong... when i print(web3.personal.Personal) gives me back a class object but I cant seem to use any functions associated with this class, says I am missing "self" argument

contract_abi = my_abi
w3 = Web3(HTTPProvider(myurl))
myContract = w3.eth.contract(address ,abi)
ref = ref = web3.personal.Personal('web3')
print(ref) #this works   
print(ref.newAccount(password='the-passphrase')) #This crashes

TypeError: newAccount() missing 1 required positional argument: 'self'
TypeError: 'property' object is not callable
3

1 Answer

It seems that web3.personal.Personal is a class, so in order to create a object you need to say ref = web3.personal.Personal()

Please note, classes are often (but not always) written with a capital letter.

3

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.