Closed jaraco closed 8 years ago
Hi. Sorry for the trouble.
Since version 3 of the library (see the changelog for details), the IRC library tries to provide a higher level interface, abstracting encoding and decoding of strings. By default, it assumes the server is using UTF-8 encoding.
If you want to restore the previous behavior, where the library just passes through the raw bytestream, there's a workaround indicated in the changelog. Let me know if that doesn't straighten things out for you or if you have additional questions.
As for the logging, I suspect that the logging level isn't set low enough to allow the messages to pass. Can you try:
irc.client.log.setLevel(logging.DEBUG)
in addition to what you've already specified?
Original comment by: Jason R. Coombs
ahh ok.
Logging now works thankyou. I did lower the logging threshold (logging.DEBUG) but it seems to the filehander not the actual logger. This is mainly to catch a really annoying disconnect AND won't reconnect issue on a particular IRCD.
as to the utf-8 issue, for now I have added a very dirty try/except trap around each bot instance BUT with some additional prints while I get to the bottom of some of the new bits in this irc.
Original comment by: jonRB
Glad I could help.
Original comment by: Jason R. Coombs
I have an irc bot which inherits from SingleServerIRCBot Because it also runs on different irc network's I 1st of all wrap it in:
I have been doing this for quite some time (this bot used the original python-irc)
I only post this since it is part of this traceback:
in the old python-irclib I would set DEBUG to true in the client.py. this upgraded irc lib seems to use logging but I cannot get it to write to a file