What happened?
I'm trying to deploy a smart contract using web3.py build_transaction and signing with private key as shown below
I get an error
Code that produced the error
unsent_deploy_dao_tx = dao_contract.constructor(votingPeriod, quorum).build_transaction({
"from": w3.to_checksum_address(ownerAddress),
"nonce": w3.eth.get_transaction_count(ownerAddress)
})
signed_tx = w3.eth.account.sign_transaction(unsent_deploy_dao_tx, private_key=ownerPrivateKey)
Full error output
An error occurred: Traceback (most recent call last): File "/home/*****/Documents/blockchain-auction/main/gui/app.py", line 106, in create_dao signed_tx = w3.eth.account.sign_transaction(unsent_deploy_dao_tx, private_key=ownerPrivateKey) File "/home/*****/Documents/blockchain-auction/main/gui/venv/lib/python3.13/site-packages/eth_utils/decorators.py", line 29, in _wrapper return self.method(obj, *args, **kwargs) ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^ File "/home/*****/Documents/blockchain-auction/main/gui/venv/lib/python3.13/site-packages/eth_account/account.py", line 834, in sign_transaction raise TypeError( f"transaction_dict must be dict-like, got {repr(transaction_dict)}" ) TypeError: transaction_dict must be dict-like, got
Fill this section in if you know how this could or should be fixed
No response
web3 Version
7.14.0
Python Version
3.13.5
Operating System
Ubuntu
Output from pip freeze
aiohappyeyeballs==2.6.1
aiohttp==3.13.2
aiosignal==1.4.0
annotated-types==0.7.0
asgiref==3.10.0
attrs==25.4.0
bitarray==3.8.0
blinker==1.9.0
certifi==2025.10.5
charset-normalizer==3.4.4
ckzg==2.1.5
click==8.2.1
cytoolz==1.1.0
eth-account==0.13.7
eth-hash==0.7.1
eth-keyfile==0.8.1
eth-keys==0.7.0
eth-rlp==2.2.0
eth-typing==5.2.1
eth-utils==5.3.1
eth_abi==5.2.0
Flask==3.1.1
frozenlist==1.8.0
hexbytes==1.3.1
idna==3.11
itsdangerous==2.2.0
Jinja2==3.1.6
MarkupSafe==3.0.2
multidict==6.7.0
parsimonious==0.10.0
propcache==0.4.1
pycryptodome==3.23.0
pydantic==2.12.4
pydantic_core==2.41.5
pyunormalize==17.0.0
regex==2025.11.3
requests==2.32.5
rlp==4.1.0
toolz==1.1.0
types-requests==2.32.4.20250913
typing-inspection==0.4.2
typing_extensions==4.15.0
urllib3==2.5.0
web3==7.14.0
websockets==15.0.1
Werkzeug==3.1.3
yarl==1.22.0
What happened?
I'm trying to deploy a smart contract using web3.py build_transaction and signing with private key as shown below
I get an error
Code that produced the error
Full error output
Fill this section in if you know how this could or should be fixed
No response
web3 Version
7.14.0
Python Version
3.13.5
Operating System
Ubuntu
Output from
pip freeze