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
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.