bad-txns-inputs-missingorspent
It's too rare to see such a self-explanatory message on Electrum!
Do you have any "local transaction" in your history?
Those have an icon that looks like a 'blue computer' instead of 'green check' or 'gears'.
This. You are trying to spend coins that doesn't belong to your wallet.
Someone sent me few coins but canceled the transaction. The status changed from
unconfirmed to
local. Whenever I try to spend it, I get the same message.
Remove any
local transaction to avoid this problem in the future.