0

I'll briefly explain my setup before describing the problem in detail.

I am on Windows 10 and using the geth client in Light Sync Mode, along with web3.py on Jupyter Notebook and Metamask as a wallet.

I have already succeeded in connecting to Rinkeby network through an Infura Node, but now i want to do the same using geth.

So, basically i want something along the lines of web3.py being able to communicate with the geth client. both of these are running on the same machine, hence i see no reason to use the HTTP provider in web3.py.

I want to use the IPCProvider of web3.py and i have tried to do so, but with no success so far.

After starting geth in light mode, i tried this in Jupyter,;

from web3 import Web3
w3 = Web3(Web3.IPCProvider(''))

I left the IPCProvider brackets empty since it auto-detects the path of the geth pipe in windows, which is ( i have tried manually inputting the path as string, but it has given me errors, so i went with the auto-detect )

\\\.\pipe\geth.ipc

and examning 'w3' variable in jupyter results in;

web3.main.Web3 object at 0x00000266CBEDB080

meaning that it is indeed a web3 instance.

however;

w3.isConnected()

results in False. Even though geth is running in the background successfully.

Also, using any arbitrary web3 functions results in an OS error

e.g if i want to get a list of accounts;

w3.eth.accounts

will give;

OSError: (5, 'CreateFile', 'Access is denied.')

From the very little documentation available on windows IPC, i have gathered that windows uses named pipes for interprocess communication, where one process writes to the pipe and the other process reads from it. But that is pretty much it and there are no helpful guides or tutorials to properly tell about how to use windows Pipes practically.

I just want to connected web3.py to geth, using IPC. So that i can send commands to the geth client from the web3.py interface

since there's very little information about geth IPC with windows, i am completely lost.

please help me out

Your Answer

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

Browse other questions tagged or ask your own question.