I believe sendmany.py will do the wrong thing in the case where it tries to find a transaction to replace from your node.
Right now the code calls listunspent(0,0), but doesn't do additional filtering to ensure that the transaction you're trying to replace is one that you can actually sign for. In particular, if you have an unconfirmed transaction which someone else created that tries to pay you, you might try to RBF that, which is likely to fail...