Nexus

py-algorand-sdk "Incorrect padding" when signing a transaction

Short answer: The private key passed to sign() is not valid base64. In py-algorand-sdk the key is a base64 string.

The exact message

Error: Incorrect padding

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

Why it happens

Captured with .sign("abc"): the error class was binascii.Error with "Incorrect padding".

How to fix it

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