autonity / aut

A command-line RPC client for Autonity
MIT License
11 stars 10 forks source link

Fix failure due to `ModuleNotFoundError` from `eth_rlp` #137

Closed aiman closed 7 months ago

aiman commented 7 months ago

The tool v0.3.0.dev4 was installing and working fine previously. But after reinstalling the tool, all operations fail due to ModuleNotFoundError:

$ aut --help

Traceback (most recent call last):
  File "/home/user/.local/bin/aut", line 5, in <module>
    from aut.__main__ import aut
  File "/home/user/.local/pipx/venvs/aut/lib64/python3.11/site-packages/aut/__main__.py", line 5, in <module>
    from aut.commands import (
  File "/home/user/.local/pipx/venvs/aut/lib64/python3.11/site-packages/aut/commands/tx.py", line 13, in <module>
    from aut.commands.account import signtx
  File "/home/user/.local/pipx/venvs/aut/lib64/python3.11/site-packages/aut/commands/account.py", line 15, in <module>
    from web3.types import BlockIdentifier
  File "/home/user/.local/pipx/venvs/aut/lib64/python3.11/site-packages/web3/__init__.py", line 1, in <module>
    from eth_account import Account  # noqa: E402,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/user/.local/pipx/venvs/aut/lib64/python3.11/site-packages/eth_account/__init__.py", line 1, in <module>
    from eth_account.account import (
  File "/home/user/.local/pipx/venvs/aut/lib64/python3.11/site-packages/eth_account/account.py", line 49, in <module>
    from eth_account._utils.legacy_transactions import (
  File "/home/user/.local/pipx/venvs/aut/lib64/python3.11/site-packages/eth_account/_utils/legacy_transactions.py", line 13, in <module>
    from eth_rlp import (
  File "/home/user/.local/pipx/venvs/aut/lib64/python3.11/site-packages/eth_rlp/__init__.py", line 5, in <module>
    from .main import (
  File "/home/user/.local/pipx/venvs/aut/lib64/python3.11/site-packages/eth_rlp/main.py", line 18, in <module>
    from typing_extensions import Self  # move to typing when >= py311
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ModuleNotFoundError: No module named 'typing_extensions'

This is likely due to a change in one of the dependencies.

raj-shekhar1 commented 7 months ago

This worked for me:

pipx inject aut typing_extensions 
aiman commented 7 months ago

Thanks @raj-shekhar1 there was a typo in my proposed workaround so I have removed it. Your command is the correct temporary workaround.

aiman commented 7 months ago

Fixed in v0.3.0