Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'solders.rpc.errors.InvalidParamsMessage' object has no attribute 'value' #27

Open
lukiifaz opened this issue Dec 29, 2024 · 1 comment

Comments

@lukiifaz
Copy link

solana==0.34.0
solana==0.34.3

Waiting for a new token creation...
Subscribed to blocks mentioning program: 6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P
New token created:
{
"name": "SHION AI",
"symbol": "SHION",
"uri": "https://ipfs.io/ipfs/QmSnYwRWFPdmZmtmhfcf7baMqLPVkD8Y3Qa7SinkMNpVMv",
"mint": "C5othK8Ej4FA3LcNMS1Zq313zHWkYDjPr9kMfUopump",
"bondingCurve": "Bn6fMTChWetRsSZ3XKGEuPbRLWx8k82UyyYQhw3DsUWr",
"associatedBondingCurve": "7qCY7SDMiSLp9fLVaXC3cpZ4UYz5Nnm6RWVAYqFNvudU",
"user": "mXNaumXZFBDL1wujYjgFBTY4mxr6rpaYSgsj1GBiXfn"
}
Token information saved to trades/C5othK8Ej4FA3LcNMS1Zq313zHWkYDjPr9kMfUopump.txt
Waiting for 15 seconds for things to stabilize...
Bonding curve address: Bn6fMTChWetRsSZ3XKGEuPbRLWx8k82UyyYQhw3DsUWr
Token price: 0.0000000321 SOL
Buying 0.010000 SOL worth of the new token with 20.0% slippage tolerance...
Creating associated token account (Attempt 1)...
Associated token account created.
Associated token account address: EboMv6xXQJohwUjg2P7fLhgHrNrBzkxKJguwUDsY8W1P
Transaction sent: https://explorer.solana.com/tx/xVTE9vzz6KrwmNXhKSn5KyyVYK4ngSV59mUquv6HSs67eHpATpewT4CPHjCZxTkJA2qsAxJAau7ZE1BbMt9MiWk
Attempt 1 failed: Unable to confirm transaction xVTE9vzz6KrwmNXhKSn5KyyVYK4ngSV59mUquv6HSs67eHpATpewT4CPHjCZxTkJA2qsAxJAau7ZE1BbMt9MiWk
Retrying in 1 seconds...
Transaction sent: https://explorer.solana.com/tx/5v57QcLgRYbUGryYhjdMjyYx8eabfweJN2q4kqKgXW61VBQD1hhiCMyQJGQbRp3YbZD5Wr8zfpaw2VJRBU2NXM9A
Attempt 2 failed: Unable to confirm transaction 5v57QcLgRYbUGryYhjdMjyYx8eabfweJN2q4kqKgXW61VBQD1hhiCMyQJGQbRp3YbZD5Wr8zfpaw2VJRBU2NXM9A
Retrying in 2 seconds...
Transaction sent: https://explorer.solana.com/tx/3eJkGZ9YCJK5XufhpNS5hgE5xrhGd2XvCkm2A26LmaVu8qFZdH5jmEcWgYozNWfEHvm69iuqi2V7U8dypfrMjQs3
Transaction confirmed
Waiting for 20 seconds before selling...
Selling tokens with 20.0% slippage tolerance...
Traceback (most recent call last):
File "trade.py", line 157, in
asyncio.run(main(yolo_mode=args.yolo, match_string=args.match, bro_address=args.bro, marry_mode=args.marry))
File "/home/lukii/.pyenv/versions/3.8-dev/lib/python3.8/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/home/lukii/.pyenv/versions/3.8-dev/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
return future.result()
File "trade.py", line 140, in main
await trade(websocket, match_string, bro_address, marry_mode, yolo_mode)
File "trade.py", line 52, in trade
await _trade(websocket, match_string, bro_address, marry_mode, yolo_mode)
File "trade.py", line 107, in _trade
sell_tx_hash = await sell_token(mint, bonding_curve, associated_bonding_curve, SELL_SLIPPAGE)
File "/home/lukii/pump-fun-bot/sell.py", line 74, in sell_token
token_balance = await get_token_balance(client, associated_token_account)
File "/home/lukii/pump-fun-bot/sell.py", line 62, in get_token_balance
if response.value:
AttributeError: 'solders.rpc.errors.InvalidParamsMessage' object has no attribute 'value'

@Sahilkhurana
Copy link

Sahilkhurana commented Jan 2, 2025

Similar error. In my case, looks like the buy transaction itself failed and the code still tried to sell it?

Token information saved to trades/CMXa8AKyC5s9vvgSxFUr9pcya5zMfeDNfTtCCJg3pump.txt
Waiting for 15 seconds for things to stabilize...
Bonding curve address: 3ujV8iQgcFCEKd2zHyH49AgMQxqFTBxCg9bVTZNxQA3U
Token price: 0.0000000340 SOL
Buying 0.001000 SOL worth of the new token with 35.0% slippage tolerance...
Attempt 1 to create associated token account failed:
Retrying in 1 seconds...
Attempt 2 to create associated token account failed:
Retrying in 2 seconds...
Creating associated token account (Attempt 3)...
Attempt 3 to create associated token account failed:
Retrying in 4 seconds...
Creating associated token account (Attempt 4)...
Attempt 4 to create associated token account failed:
Retrying in 8 seconds...
Creating associated token account (Attempt 5)...
Attempt 5 to create associated token account failed:
Max retries reached. Unable to create associated token account.
Buy transaction failed.

Selling tokens with 35.0% slippage tolerance...
Traceback (most recent call last):
File "/home/sk/Documents/python/pump-fun-bot/trade.py", line 157, in
asyncio.run(main(yolo_mode=args.yolo, match_string=args.match, bro_address=args.bro, marry_mode=args.marry))
File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/sk/Documents/python/pump-fun-bot/trade.py", line 140, in main
await trade(websocket, match_string, bro_address, marry_mode, yolo_mode)
File "/home/sk/Documents/python/pump-fun-bot/trade.py", line 52, in trade
await _trade(websocket, match_string, bro_address, marry_mode, yolo_mode)
File "/home/sk/Documents/python/pump-fun-bot/trade.py", line 107, in _trade
sell_tx_hash = await sell_token(mint, bonding_curve, associated_bonding_curve, SELL_SLIPPAGE)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sk/Documents/python/pump-fun-bot/sell.py", line 74, in sell_token
token_balance = await get_token_balance(client, associated_token_account)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sk/Documents/python/pump-fun-bot/sell.py", line 62, in get_token_balance
if response.value:
^^^^^^^^^^^^^^
AttributeError: 'solders.rpc.errors.InvalidParamsMessage' object has no attribute 'value'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants