My bad:
Using the -v switch with decode.py throws an error UnboundLocalError: local variable 'json_cardname' referenced before assignment. Caused by 5e09c65. Probably just needs a different variable name in the decode handling (works OK on encode from JSON).