Skip to content

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

@anbang

Description

@anbang

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions