Nexus

py-algorand-sdk WrongMnemonicLengthError: "mnemonic length must be 25"

Short answer: The recovery phrase does not have exactly 25 words.

The exact message

WrongMnemonicLengthError: mnemonic length must be 25

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

Why it happens

Captured by passing the first 24 words of a valid mnemonic to mnemonic.to_private_key.

How to fix it

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