Nexus

py-algorand-sdk AtomicTransactionComposerError: "must be in BUILDING state for a transaction to be added"

Short answer: You added to a composer that had already built its group.

The exact message

AtomicTransactionComposerError: AtomicTransactionComposer must be in BUILDING state for a transaction to be added

Source: captured locally with py-algorand-sdk 2.12.0 on 2026-12-03.

Why it happens

Captured by calling add_transaction after build_group(). After building, the group id is fixed.

How to fix it

Wording can change between SDK versions. All Python SDK errors · errors.json · JavaScript SDK errors · API errors · node errors