I am working on a smart contract integrated Django project. But When I try to check the account using Web3.eth.accounts get an error,

AttributeError: type object 'Web3' has no attribute 'eth'

Other coding part given below,

from web3 import Web3
import time
import sys
from .auth_contract_connection import contract_address,abi
from connection import connection


how I slow this?

1 Answer 1


You need to call what was initialised as Web3. in your case, con


alternatively use the standard web3 or w3

web3 = Web3(Web3.HTTPProvider("HTTP://"))

then your code will work with web.eth.accounts

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.