-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
web3 ConnectionError: HTTPConnectionPool(host='127.0.0.1', port=8545) #1650
Comments
Hey @iDataist, this could be an issue with how you're running the client you're trying to connect to. What client are you running (e.g., geth, openethereum, etc.) and what command are you using to run it? |
Closing since I believe this is a configuration issue (and a month old). Hope you've got it resolved, but please reopen with more details if you still have issues. |
In case anybody else is having this problem, adding --rpc after geth fixed it for me. --http.address localhost --http.port 8545 also may help |
I also found out that you need to connect via http:// rather than https:// because I don't have a valid cert (as far as I see), and in http:// it works fine (slower, because every connection has to do a handshake, but works). |
Is there a clear solution for this? I'm facing the same problem |
pip freeze
outputWhat was wrong?
The first two lines worked fine.
from web3 import Web3
w3 = Web3(Web3.HTTPProvider('HTTP://127.0.0.1:8545'))
The code which produced the error
w3.eth.getBalance("0xD498cEb53D2E1b48375e2d1F1a257f5B787C9fD5")
The full output of the error
How can it be fixed?
I read other posts that had similar problems, but did not figure out how to fix this. Is there any libraries that need to be updated?
The text was updated successfully, but these errors were encountered: