Python Forum
ValueError in dataclasses.py - using staking-deposit-cli
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ValueError in dataclasses.py - using staking-deposit-cli
#1
My project uses https://github.com/ethereum/staking-depo...y_handling

When trying execute it, I get the following:

Error:
Running deposit-cli... Traceback (most recent call last): File "/blockchain/staking-deposit-cli/./staking_deposit/deposit.py", line 4, in <module> from staking_deposit.cli.existing_mnemonic import existing_mnemonic File "/blockchain/staking-deposit-cli/venv/lib/python3.11/site-packages/staking_deposit/cli/existing_mnemonic.py", line 19, in <module> from staking_deposit.utils.validation import validate_int_range File "/blockchain/staking-deposit-cli/venv/lib/python3.11/site-packages/staking_deposit/utils/validation.py", line 24, in <module> from staking_deposit.credentials import ( File "/blockchain/staking-deposit-cli/venv/lib/python3.11/site-packages/staking_deposit/credentials.py", line 14, in <module> from staking_deposit.key_handling.keystore import ( File "/blockchain/staking-deposit-cli/venv/lib/python3.11/site-packages/staking_deposit/key_handling/keystore.py", line 62, in <module> @dataclass ^^^^^^^^^ File "/usr/lib/python3.11/dataclasses.py", line 1220, in dataclass return wrap(cls) ^^^^^^^^^ File "/usr/lib/python3.11/dataclasses.py", line 1210, in wrap return _process_class(cls, init, repr, eq, order, unsafe_hash, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/dataclasses.py", line 958, in _process_class cls_fields.append(_get_field(cls, name, type, kw_only)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib/python3.11/dataclasses.py", line 815, in _get_field raise ValueError(f'mutable default {type(f.default)} for field ' ValueError: mutable default <class 'staking_deposit.key_handling.keystore.KeystoreModule'> for field kdf is not allowed: use default_factory
I'm using Python 3.11.2 on a Raspberry PI 5.
Any idea how to fix this? Am I missing packages?
alexjordan likes this post
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  ValueError in dataclasses.py - Please help! andrewk 4 985 Feb-17-2025, 11:21 AM
Last Post: andrewk
  Variable sorting methods for Enum DataClasses koen 1 1,714 May-30-2023, 07:31 PM
Last Post: deanhystad

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020