Skip to content
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

ValueError: {'code': -32601, 'message': 'The method txpool_content does not exist/is not available'} #42

Open
anbang opened this issue Apr 12, 2019 · 4 comments

Comments

@anbang
Copy link

anbang commented Apr 12, 2019

I haven't been able to get this backend to run properly.

Running on Ubuntu 18

python version

$ python3 --version
Python 3.6.7

geth version

$ geth version
WARN [04-12|16:37:20.962] Sanitizing cache to Go's GC limits       provided=1024 updated=656
Geth
Version: 1.8.26-stable
Git Commit: cdae1c59abc32f85debfa29577fbf1ed036ebf73
Architecture: amd64
Protocol Versions: [63 62]
Network Id: 1
Go Version: go1.10.4
Operating System: linux
GOPATH=
GOROOT=/usr/lib/go-1.10

Starting my geth instance with

$ geth  --rpc --datadir "/home/bang/Documents/geth-data"

The console output is the following (repeating the error)

bang@ubuntu:~/Documents/ethgasstation-backend$ ./ethgasstation.py 
      __  __                     __       __  _         
 ___ / /_/ /  ___ ____ ____ ___ / /____ _/ /_(_)__  ___ 
/ -_) __/ _ \/ _ `/ _ `(_-<(_-</ __/ _ `/ __/ / _ \/ _ \
\__/\__/_//_/\_, /\_,_/___/___/\__/\_,_/\__/_/\___/_//_/
            /___/                                       

[2019-04-12 16:30:14] [INFO]  Type ctl-c to quit and save data to mysql
[2019-04-12 16:30:14] [INFO]  blocks 0
[2019-04-12 16:30:14] [INFO]  txcount 0
[2019-04-12 16:30:14] [INFO]  getting txpool hashes at block 0 ...
[2019-04-12 16:30:14] [INFO]  Switching pending tx acquisition method to parity
[2019-04-12 16:30:14] [ERROR] Traceback (most recent call last):
  File "/home/bang/Documents/ethgasstation-backend/egs/egs_ref.py", line 122, in _get_pending_tx_hashes
    txpoolcontent = web3.txpool.content
  File "/home/bang/.local/lib/python3.6/site-packages/web3/txpool.py", line 9, in content
    return self.web3.manager.request_blocking("txpool_content", [])
  File "/home/bang/.local/lib/python3.6/site-packages/web3/manager.py", line 106, in request_blocking
    raise ValueError(response["error"])
ValueError: {'code': -32601, 'message': 'The method txpool_content does not exist/is not available'}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/bang/Documents/ethgasstation-backend/egs/egs_ref.py", line 146, in append_current_txp
    hashlist = self._get_pending_tx_hashes()
  File "/home/bang/Documents/ethgasstation-backend/egs/egs_ref.py", line 138, in _get_pending_tx_hashes
    return self._get_pending_tx_hashes(False)
  File "/home/bang/Documents/ethgasstation-backend/egs/egs_ref.py", line 129, in _get_pending_tx_hashes
    txpoolpending = web3.manager.request_blocking('parity_pendingTransactions',[])
  File "/home/bang/.local/lib/python3.6/site-packages/web3/manager.py", line 106, in request_blocking
    raise ValueError(response["error"])
ValueError: {'code': -32601, 'message': 'The method parity_pendingTransactions does not exist/is not available'}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/bang/Documents/ethgasstation-backend/egs/main.py", line 29, in master_control
    txpool.append_current_txp()
  File "/home/bang/Documents/ethgasstation-backend/egs/egs_ref.py", line 152, in append_current_txp
    console.warn(e)
  File "/home/bang/Documents/ethgasstation-backend/egs/output.py", line 39, in warn
    msg = self._pad(msg)
  File "/home/bang/Documents/ethgasstation-backend/egs/output.py", line 70, in _pad
    lines = string.split("\n")
AttributeError: 'ValueError' object has no attribute 'split'

[2019-04-12 16:30:14] [INFO]  getting txpool hashes at block 0 ...
[2019-04-12 16:30:14] [INFO]  Switching pending tx acquisition method to geth
[2019-04-12 16:30:14] [ERROR] Traceback (most recent call last):
  File "/home/bang/Documents/ethgasstation-backend/egs/egs_ref.py", line 129, in _get_pending_tx_hashes
    txpoolpending = web3.manager.request_blocking('parity_pendingTransactions',[])
  File "/home/bang/.local/lib/python3.6/site-packages/web3/manager.py", line 106, in request_blocking
    raise ValueError(response["error"])
ValueError: {'code': -32601, 'message': 'The method parity_pendingTransactions does not exist/is not available'}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/bang/Documents/ethgasstation-backend/egs/egs_ref.py", line 146, in append_current_txp
    hashlist = self._get_pending_tx_hashes()
  File "/home/bang/Documents/ethgasstation-backend/egs/egs_ref.py", line 138, in _get_pending_tx_hashes
    return self._get_pending_tx_hashes(False)
  File "/home/bang/Documents/ethgasstation-backend/egs/egs_ref.py", line 122, in _get_pending_tx_hashes
    txpoolcontent = web3.txpool.content
  File "/home/bang/.local/lib/python3.6/site-packages/web3/txpool.py", line 9, in content
    return self.web3.manager.request_blocking("txpool_content", [])
  File "/home/bang/.local/lib/python3.6/site-packages/web3/manager.py", line 106, in request_blocking
    raise ValueError(response["error"])
ValueError: {'code': -32601, 'message': 'The method txpool_content does not exist/is not available'}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/bang/Documents/ethgasstation-backend/egs/main.py", line 29, in master_control
    txpool.append_current_txp()
  File "/home/bang/Documents/ethgasstation-backend/egs/egs_ref.py", line 152, in append_current_txp
    console.warn(e)
  File "/home/bang/Documents/ethgasstation-backend/egs/output.py", line 39, in warn
    msg = self._pad(msg)
  File "/home/bang/Documents/ethgasstation-backend/egs/output.py", line 70, in _pad
    lines = string.split("\n")
AttributeError: 'ValueError' object has no attribute 'split'

[2019-04-12 16:30:14] [INFO]  getting txpool hashes at block 0 ...
[2019-04-12 16:30:14] [INFO]  Switching pending tx acquisition method to parity
[2019-04-12 16:30:14] [ERROR] Traceback (most recent call last):

The cause of the error

 File "/home/bang/Documents/ethgasstation-backend/egs/egs_ref.py", line 122, in _get_pending_tx_hashes
    txpoolcontent = web3.txpool.content
  File "/home/bang/.local/lib/python3.6/site-packages/web3/txpool.py", line 9, in content
    return self.web3.manager.request_blocking("txpool_content", [])
  File "/home/bang/.local/lib/python3.6/site-packages/web3/manager.py", line 106, in request_blocking
    raise ValueError(response["error"])
ValueError: {'code': -32601, 'message': 'The method txpool_content does not exist/is not available'}

I try to view txpool.content

$ geth  console
...other info...
> txpool.content
{
  pending: {},
  queued: {}
}

( Current GETH synchronization information is not complete )

I found two similar questions, But not solved.

#2

#36

Has anyone encountered the same problem? Ask for help

@zihang740
Copy link

I had the same problem and asked for help

@zihang740
Copy link

你好, 朋友, 我也遇到同样的问题,你是怎么解决的呢

@gnasnik
Copy link

gnasnik commented May 25, 2021

same here, how to slove it?

@JohnReedV
Copy link

Having the same problem with web3 rust

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants