ethereum-etl icon indicating copy to clipboard operation
ethereum-etl copied to clipboard

ethereumetl: command not found

Open cs201503 opened this issue 3 years ago • 7 comments

Hi, I just installed ethereum ETL according to the command "pip3 install ethereum-etl", but when I try to export blocks and transactions using ethereumetl export_blocks_and_transactions --start-block 0 --end-block 500000 --provider-uri file://$HOME/.ethereum/geth/geth/chaindata --blocks-output blocks.csv --transactions-output transactions.csv it says "ethereumetl: command not found". Anyone know what I did wrong? Thank you very much!

cs201503 avatar Jul 08 '21 09:07 cs201503

Check if you have installed ethereum-etl to the right version of Python

ksiau avatar Jul 10 '21 11:07 ksiau

Check if you have installed ethereum-etl to the right version of Python

Hi @ksiau , I have Python 3.8.10 Which is the correct version that I should use with ethereumetl?

cs201503 avatar Jul 12 '21 08:07 cs201503

Check if you have installed ethereum-etl to the right version of Python

Hi @ksiau , I have Python 3.8.10 Which is the correct version that I should use with ethereumetl?

Python 3.8.10 is fine (see setup.py). I was saying that maybe you have several Python environment, and you might have installed it to the wrong environment? Try python3 -m ethereumetl --help or pip3 list to make suer you have installed successfully

ksiau avatar Jul 13 '21 11:07 ksiau

Check if you have installed ethereum-etl to the right version of Python

Hi @ksiau , I have Python 3.8.10 Which is the correct version that I should use with ethereumetl?

Python 3.8.10 is fine (see setup.py). I was saying that maybe you have several Python environment, and you might have installed it to the wrong environment? Try python3 -m ethereumetl --help or pip3 list to make suer you have installed successfully

Hi @ksiau , thank you! after typing "python3 -m ethereumetl --help", I got the following:

`Symbolic Execution not available: No module named 'mythril' pyetherchain not available: No module named 'pyetherchain' Usage: main.py [OPTIONS] COMMAND [ARGS]...

Options: --version Show the version and exit. --help Show this message and exit.

Commands: export_all Exports all data for a range of blocks. export_blocks_and_transactions Exports blocks and transactions. export_contracts Exports contracts bytecode and sighashes. export_geth_traces Exports traces from geth node. export_origin Exports Origin Protocol data. export_receipts_and_logs Exports receipts and logs. export_token_transfers Exports ERC20/ERC721 transfers. export_tokens Exports ERC20/ERC721 tokens. export_traces Exports traces from parity node. extract_contracts Extracts contracts from traces file. extract_csv_column Extracts column from given CSV file. extract_field Extracts field from given CSV or JSON... extract_geth_traces Extracts geth traces from JSON lines file. extract_token_transfers Extracts ERC20/ERC721 transfers from logs... extract_tokens Extracts tokens from contracts file. filter_items Filters rows in given CSV or JSON... get_block_range_for_date Outputs start and end blocks for given... get_block_range_for_timestamps Outputs start and end blocks for given... get_keccak_hash Outputs 32-byte Keccak hash of given... stream Streams all data types to console or... ` do I need to re-install?

cs201503 avatar Jul 14 '21 08:07 cs201503

Check if you have installed ethereum-etl to the right version of Python

Hi @ksiau , I have Python 3.8.10 Which is the correct version that I should use with ethereumetl?

Python 3.8.10 is fine (see setup.py). I was saying that maybe you have several Python environment, and you might have installed it to the wrong environment? Try python3 -m ethereumetl --help or pip3 list to make suer you have installed successfully

Hi @ksiau , thank you! after typing "python3 -m ethereumetl --help", I got the following:

`Symbolic Execution not available: No module named 'mythril' pyetherchain not available: No module named 'pyetherchain' Usage: main.py [OPTIONS] COMMAND [ARGS]...

Options: --version Show the version and exit. --help Show this message and exit.

Commands: export_all Exports all data for a range of blocks. export_blocks_and_transactions Exports blocks and transactions. export_contracts Exports contracts bytecode and sighashes. export_geth_traces Exports traces from geth node. export_origin Exports Origin Protocol data. export_receipts_and_logs Exports receipts and logs. export_token_transfers Exports ERC20/ERC721 transfers. export_tokens Exports ERC20/ERC721 tokens. export_traces Exports traces from parity node. extract_contracts Extracts contracts from traces file. extract_csv_column Extracts column from given CSV file. extract_field Extracts field from given CSV or JSON... extract_geth_traces Extracts geth traces from JSON lines file. extract_token_transfers Extracts ERC20/ERC721 transfers from logs... extract_tokens Extracts tokens from contracts file. filter_items Filters rows in given CSV or JSON... get_block_range_for_date Outputs start and end blocks for given... get_block_range_for_timestamps Outputs start and end blocks for given... get_keccak_hash Outputs 32-byte Keccak hash of given... stream Streams all data types to console or... ` do I need to re-install?

Yes, you have installed it in python3. Just replace the ethereumetl export_blocks_and_transactions --start-block 0 --end-block 500000 --provider-uri file://$HOME/.ethereum/geth/geth/chaindata --blocks-output blocks.csv --transactions-output transactions.csv by python3 -m ethereumetl export_blocks_and_transactions --start-block 0 --end-block 500000 --provider-uri file://$HOME/.ethereum/geth/geth/chaindata --blocks-output blocks.csv --transactions-output transactions.csv. It will probably run.

ksiau avatar Jul 21 '21 13:07 ksiau

Hi @ksiau Thank you for your reply! After I replaced the code with "python3 -m ethereumetl export_blocks_and_transactions --start-block 0 --end-block 500000 --provider-uri file://$HOME/.ethereum/geth/chaindata --blocks-output blocks.csv --transactions-output transactions.csv"

the following error appeared:

Symbolic Execution not available: No module named 'mythril' pyetherchain not available: No module named 'pyetherchain' 2021-07-26 08:07:35,603 - ProgressLogger [INFO] - Started work. Items to process: 638921. 2021-07-26 08:07:35,606 - BatchWorkExecutor [ERROR] - An exception occurred while executing work_handler. Traceback (most recent call last): File "/home/user/.local/lib/python3.8/site-packages/ethereumetl/executors/batch_work_executor.py", line 63, in _fail_safe_execute work_handler(batch) File "/home/user/.local/lib/python3.8/site-packages/ethereumetl/jobs/export_blocks_job.py", line 75, in _export_batch response = self.batch_web3_provider.make_batch_request(json.dumps(blocks_rpc)) File "/home/user/.local/lib/python3.8/site-packages/ethereumetl/providers/ipc.py", line 46, in make_batch_request with self._lock, self._socket as sock: File "/home/user/.local/lib/python3.8/site-packages/web3/providers/ipc.py", line 46, in enter self.sock = self._open() File "/home/user/.local/lib/python3.8/site-packages/web3/providers/ipc.py", line 59, in _open return get_ipc_socket(self.ipc_path) File "/home/user/.local/lib/python3.8/site-packages/web3/providers/ipc.py", line 30, in get_ipc_socket sock.connect(ipc_path) ConnectionRefusedError: [Errno 111] Connection refused

I tried to replace the block number to a smaller range "5110000 --end-block 5114862", but the error still exists. How can I repair this error?

cs201503 avatar Jul 26 '21 11:07 cs201503

provider uri should be the IPC path, not the datadir. eg., file://$HOME/.ethereum/geth.ipc

GauthamramRavichandran avatar Jun 24 '22 07:06 GauthamramRavichandran