def encode(self, line):
        try:
            return line.encode(self.encoding)
        except UnicodeError:
            logger.warning(
                'Stopping actor due to encode problem, data '
                'supplied by client was not valid %s',
                self.encoding)
            self.stop()
error(msg : string)
dataset/ETHPy150Open mopidy/mopidy/mopidy/internal/network.py/LineProtocol.encode--crossover with--dataset/ETHPy150Open jookies/jasmin/jasmin/protocols/cli/options.py/OptionParser.error