algosdk "address seems to be malformed: expected length 58"
Short answer: The string you passed as an address is not 58 characters, so it is not an Algorand address.
The exact message
address seems to be malformed: expected length 58, got 12: NOTANADDRESS
Source: Error, captured locally with algosdk 3.9.0 on 2026-12-03.
Why it happens
The same message appeared for three different calls: a payment receiver "NOTANADDRESS" (got 12), decodeAddress("ABC") (got 3) and an ABI address encode of "nope" (got 4). The message ends with the string you passed.
How to fix it
An Algorand address is 58 uppercase characters (base32). Print the value and its length before building the transaction.
A common cause is passing an account object instead of its address, or a variable that is empty or truncated.