Error message when calculating the fee @create a simple transaction

Going through the tutorial I get an error message when calculating the fee. Any help is appreciated thanks!

–tx-body-file tx.raw
–tx-in-count 1
–tx-out-count 2
–witness-count 1
–byron-witness-count 0
–testnet-magic 1097911063
–protocol-params-file protocol.json
Error while reading unsigned shelley tx: tx.raw: tx.raw: openBinaryFile: does not exist (No such file or directory)

I figured it out. The backslash wasn’t spaced at the end of the tx out line
–tx-out $(cat payment2.addr)+100000000\ (typo)

–tx-out $(cat payment.addr)+0 \

–ttl 0 \

–fee 0 \

–out-file tx.raw

1 Like

Yeah, also watch out for invisible spacebar presses/spaces after the back slash, as these will lead to errors as well. Example given
–tx-out $(cat payment2.addr)+100000000 \
where represents the cursor position. If you can extend the cursor position beyond the slash ‘\’, this means any extra spaces after the backwards slash will be treated as special characters follow by a carriage return to the next line which will mess up the command, at least within the bash shell using any vim “deriviate”, including the C (and vim-script) re-written neovim. I don’t know about other editors like nano, but it has caused me problems in the past, these “invisible spaces” after ‘\’.
Maybe some editors are designed to ignore extra spaces after the backslash, or at least have that option - I don’t know.

If you copy and paste the command with extra space(s) after ‘\’ at the end of the line, it will work - no worries.
But, if you give the file ‘executable’ permissions and try to run it as a script, then that’s when you get the error(s).
You will also get errors if you add an extra ‘invisible’ line to the command:e.g.,
line 1
line 2

line n

In this case, there is an extra last line of blank spaces between line n and the end of the file bounded by the first ~ after line n.
Regardless if you ‘copy and paste’ or run the file as an executable script/command, it will produce errors in both cases, in the former case it only happens if you happen to copy and paste the extra line produced, but that can be avoided. You can’t avoid that when running the command as a script.