It sounds like it's trying to use the slave database connection for write operations, but it'd be interesting to find out where exactly that error is coming from - I'm not sure if it's from the DB itself, or somewhere in the code that knows it should be talking to a different database. I'm assuming this must be specific to this script rather than a config issue, because otherwise we'd have a lot of other scripts complaining of similar things.
It sounds like it's trying to use the slave database connection for write operations, but it'd be interesting to find out where exactly that error is coming from - I'm not sure if it's from the DB itself, or somewhere in the code that knows it should be talking to a different database. I'm assuming this must be specific to this script rather than a config issue, because otherwise we'd have a lot of other scripts complaining of similar things.