pydle icon indicating copy to clipboard operation
pydle copied to clipboard

[all] 501 Numeric is unrecognized by pydle.

Open johnlage opened this issue 8 years ago • 4 comments

Pydle complains about a 501 numeric response (meaning unknown mode) being unknown, it should probably be ignored.

johnlage avatar Oct 30 '16 19:10 johnlage

I've been thinking about how to work with stuff like that for a while. They probably shouldn't be swallowed entirely as they are server error messages that can be useful in diagnosing bot behaviour. I'm considering adding a simple warning wrapper (BasicClient._warn or something similar) and have those kind of messages just be logged as a warning. Any thoughts?

shizmob avatar Oct 30 '16 19:10 shizmob

That could work fairly well, although another possible solution/debugging tool could be having an option to dump raw io to stdout/a log file. I currently am using a small wrapper around Client to do that on my debug bot.

johnlage avatar Oct 30 '16 19:10 johnlage

What we currently do there is that you can set set the pydle logger level to debug to at least get a dump of all incoming messages, and then you can attach a logging.FileHandler to that logger. Adding outgoing messages to that is probably useful as well.

shizmob avatar Oct 30 '16 19:10 shizmob

Ah, good to know that is a thing that exists.

johnlage avatar Oct 30 '16 20:10 johnlage