[Python] "External message was not accepted" error when sending a transaction in TON using...

Discussão em 'Python' iniciado por Stack, Março 9, 2025.

  1. Stack

    Stack Membro Participativo

    I'm using pytonlib to send a transaction in the TON network. However, when calling raw_send_message, I get the following error:

    pytonlib.tonlibjson.ExternalMessageNotAccepted: LITE_SERVER_UNKNOWN: cannot apply external message to current state : External message was not accepted
    Cannot run message on account: inbound external message rejected by transaction 13FB696E8CD9B2F71C7B034A2BB629A14DA4F16143B6395969150C0CDF15F732:
    exitcode=0, steps=0, gas_used=0


    Here is the code that triggers the error:

    query = wallet.create_transfer_message(
    to_addr=new_wallet.address.to_string(),
    amount=to_nano(0.05, "ton"),
    seqno=seqno,
    state_init=None # or removed entirely
    )

    await client.raw_send_message(query["message"].to_boc(False))


    Why is TON rejecting the message? Should I update seqno, or is there an issue with the message itself? How can I fix this error?

    I try anything in this course said.

    What I've checked so far:

    • Is seqno correct? – I verified it, and it's 85143.
    • Tried removing state_init – The error persists.
    • Checked wallet balance – There are enough funds.

    Continue reading...

Compartilhe esta Página