Go to your data folder and start editing your masternode.conf
Remove all extra space characters in the end of the lines and between your texts.
Restart the wallet.
If you continue receiving the same error, you are probably missing to remove an extra space on your masternode.conf so please check details again to make sure.