Author

Topic: Unable to sign transactions from command line: UnicodeDecodeError (Read 168 times)

newbie
Activity: 2
Merit: 14
I have discussed this with the developers and they indicate that the binary unsigned transaction files output by Electrum from v4 are not compatible with python piping scripts used to import them on the command line.

The simple workaround is to create the unsigned transaction, and instead of saving to file, use "Export > Copy to Clipboard". Paste the unsigned transaction as text into a text editor, and then save that text to a file.

Electrum command line can then sign the transaction using this saved file with the normal command of the form:

cat unsigned.txn | python3 Electrum-4.0.3/run_electrum signtransaction -o -w WALLETNAME - > signed.txn

 (assuming the unsigned transaction is in a file named 'unsigned.txn')
HCP
legendary
Activity: 2086
Merit: 4363
I would suggest that you log this error (with the appropriate details of the devices being used, relevant OSes and application versions etc) over on the Electrum github "Issues" register, the devs are generally way more active over there.

Refer: https://github.com/spesmilo/electrum/issues
newbie
Activity: 2
Merit: 14
I use Electrum (full GUI version) for my watching only wallet on a Debian 10 machine. I have my cold storage wallet on a Raspberry Pi running the command line version of Electrum.

Using version 3.3.8 I was able to export an unsigned.txn from the watching wallet and sign it using the Pi cold wallet.

I have just upgraded to version 4.0.3 on both machines. Now the export from the watching wallet is in .psbt format (it used to be .txn format). When I try to sign this on the Pi command line I get the following error:

UnicodeDecodeError: 'utf-8' codec can't decode bute 0xff in position 4: Invalid start byte

Please could anyone help me resolve this problem?

Your help is much appreciated.
Jump to: