Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[all] 501 Numeric is unrecognized by pydle. #58

Open
johnlage opened this issue Oct 30, 2016 · 4 comments
Open

[all] 501 Numeric is unrecognized by pydle. #58

johnlage opened this issue Oct 30, 2016 · 4 comments

Comments

@johnlage
Copy link

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

@johnlage johnlage changed the title [both branches] 501 Numeric is unrecognized by pydle. [all] 501 Numeric is unrecognized by pydle. Oct 30, 2016
@shizmob
Copy link
Owner

shizmob commented Oct 30, 2016

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?

@johnlage
Copy link
Author

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.

@shizmob
Copy link
Owner

shizmob commented Oct 30, 2016

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.

@johnlage
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants