Questions tagged [web3py]

Web3.py is a library for interacting with EVM based blockchains and smart contracts in Python.

For more information see Web3.py documentation.

Web3.py is maintained by Ethereum Foundation.

578 questions
0
votes
0 answers

web3 installed but not accessible using python

web3 is already installed (using pip3) but in different path. I tried many ways to import web3 but its shows no module named web3 every time. I have already tried pip install as well as pip3 install but none is solving the issue. how can I solve the…
0
votes
1 answer

ImportError: No module named web3 in Django

I'm trying to set up a wallet on Django, but I keep getting this error: ImportError: No module named web3 this is how I call it: from web3 import Web3 (also tried import web3)
rabiaasif
  • 305
  • 3
  • 6
  • 21
0
votes
1 answer

How to import a private key into go ethereum using web3.py

I would like to import as well as delete the private key from go-ethereum (geth), using the web3.py client. Can you please suggest the appropriate functions? I have already generated the private key.
kulls
  • 845
  • 2
  • 12
  • 37
0
votes
1 answer

web3.py SendTransaction only in pending

I wonder why all the Txs send with the method web3.eth.sendTransaction({})in my private network to a node ending up in the pending section of the txpool. Why aren't they counted in the queued-section? what are the differences betweend pending and…
TimRicta
  • 135
  • 1
  • 2
  • 8
0
votes
1 answer

web3@1.0.0-beta.26 Install Fails with Yarn

The following install fails: $ sudo yarn add -P web3@1.0.0-beta.26 Here's the error: gyp ERR! configure error gyp ERR! stack Error: Python executable "/anaconda3/bin/python" is v3.6.4, which is not supported by gyp. gyp ERR! stack You can pass the…
Ron Allen Smith
  • 603
  • 2
  • 7
  • 19
0
votes
1 answer

Ethereum Blockchain trying to send transaction using web3.py

I am able to use the web3.py library and I am able to deploy the contract directly using my node in Ethereum. I created my solidity code in remix and copied the ABI in the Ethereum console to deploy the code. I got the address of the contract as…
slaveCoder
  • 519
  • 2
  • 17
  • 46
0
votes
0 answers

Transaction fails when calling contract function with return value

I'm hitting some unintuitive behavior in solidity when one of my contracts calls another. I'm testing the contracts with web3py. Here's is the most minimal example I could come up with. Note that it may not actually be a minimal example because…
Paymahn Moghadasian
  • 9,301
  • 13
  • 56
  • 94
0
votes
0 answers

Cannot run script using web3py

My OS is Linux Ubuntu 16.04 - ec2 amazon; I am using python3.6 I have tried on different servers, time 0 reinstalled python ubuntu@1:~/Desktop/ico$ python3 token.py Traceback (most recent call last): File "token.py", line 8, in from…
0
votes
1 answer

Unintuitive solidity contract return values in ethereum

I'm playing around with ethereum and python and I'm running into some weird behavior I can't make sense of. I'm having trouble understanding how return values work when calling a contract function with the python w3 client. Here's a minimal example…
Paymahn Moghadasian
  • 9,301
  • 13
  • 56
  • 94
0
votes
1 answer

No output in a transaction response

I'm making some tests on web3.py and there is a thing I don't undertand. I have a contract like this: contract Test { function add(uint x, uint y) returns(uint){ return x + y; } When i make a transaction on it using transaction =…
0
votes
0 answers

Strange behaviour solidity contract returning huge uint array

I use web3.py to read out a large amount of data and I cannot see what goes wrong here. getValue() and getValue2(), both can be called from remix.ethereum.org without an error, but when I use the python code I posted, then I can only read out…
HansPeterLoft
  • 489
  • 1
  • 9
  • 28
0
votes
1 answer

Does python's Web3 port fully implement the Web3 API?

There are different ports of Web3, including python (see https://web3py.readthedocs.io/en/stable/). My questions: It is a full implementation of the Web3 API? Is it aligned with Web3.js?
leco
  • 1,989
  • 16
  • 30
-1
votes
2 answers

How to resolve "not Authorized 401" when accessing Geth using web3 package?

I have this code in Python from web3 import Web3 from lxml import html import requests import random from colorama import Fore, Style from hdwallet import HDWallet from hdwallet.symbols import ETH as SYMBOL z=0 w3 =…
-1
votes
0 answers

How to get token name from hex

I have hex transactions and the address of the original wallet etc but the question is, is it possible to somehow get how many people bought/sold/swapped etc. Here is an example of a wallet: click I write in python using docs.etherscan.io, but I…
-1
votes
0 answers

Code to find New Listings on Ethereum Chain and fetch the data to the web site is not working for me

Here is the code for Fetching ethereum listings but I cannot see what am I missing here, I added the script under the Footer where and endpoints are given properly as I see, please do correct me where I'm not doing good.