Issue #14 resolved

pmxbot is not handling unicode characters well

Jason R. Coombs
created an issue

{{{ Traceback (most recent call last): File "/usr/local/bin/yg-pmxbot", line 9, in <module> load_entry_point('yg.irc==1.5.2', 'console_scripts', 'yg-pmxbot')() File "/usr/local/lib/python2.6/site-packages/yg.irc-1.5.2-py2.6.egg/yg/irc/startup.py", line 35, in run pmxbot.run(configDict=_build_config_dict()) File "/usr/local/lib/python2.6/site-packages/pmxbot-1100b5-py2.6.egg/pmxbot/pmxbot.py", line 866, in run bot.start() File "/usr/local/lib/python2.6/site-packages/ircbot.py", line 247, in start SimpleIRCClient.start(self) File "/usr/local/lib/python2.6/site-packages/irclib.py", line 1104, in start self.ircobj.process_forever() File "/usr/local/lib/python2.6/site-packages/irclib.py", line 229, in process_forever self.process_once(timeout) File "/usr/local/lib/python2.6/site-packages/irclib.py", line 214, in process_once self.process_data(i) File "/usr/local/lib/python2.6/site-packages/irclib.py", line 183, in process_data c.process_data() File "/usr/local/lib/python2.6/site-packages/irclib.py", line 571, in process_data self._handle_event(Event(command, prefix, target, [m])) File "/usr/local/lib/python2.6/site-packages/irclib.py", line 594, in _handle_event self.irclibobj._handle_event(self, event) File "/usr/local/lib/python2.6/site-packages/irclib.py", line 326, in _handle_event if handler1 == "NO MORE": File "/usr/local/lib/python2.6/site-packages/irclib.py", line 1043, in _dispatcher getattr(self, m)(c, e) File "/usr/local/lib/python2.6/site-packages/pmxbot-1100b5-py2.6.egg/pmxbot/botbase.py", line 121, in on_pubmsg self.handle_action(c, e, channel, nick, msg) File "/usr/local/lib/python2.6/site-packages/pmxbot-1100b5-py2.6.egg/pmxbot/botbase.py", line 202, in handle_action self._handle_output(channel, res) File "/usr/local/lib/python2.6/site-packages/pmxbot-1100b5-py2.6.egg/pmxbot/botbase.py", line 152, in _handle_output self.out(channel, item, not secret) File "/usr/local/lib/python2.6/site-packages/pmxbot-1100b5-py2.6.egg/pmxbot/botbase.py", line 69, in out logger.message(channel, self._nickname, s) File "/usr/local/lib/python2.6/site-packages/pmxbot-1100b5-py2.6.egg/pmxbot/logging.py", line 38, in message self.db.execute(INSERT_LOG_SQL, [now, channel.lower(), nick, msg]) sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit byte strings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode str ings. }}}

Comments (1)

  1. Jason R. Coombs reporter

    I'm going to assume this is fixed unless someone reports they're experiencing it. Most of the library has been converted to use Unicode natively (and in fact, runs on Python 3 now), so I suspect this issue has been resolved in the meantime.

  2. Log in to comment