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

No handlers could be found for logger "smart_open.ssh" #288

Closed
piskvorky opened this issue Apr 12, 2019 · 2 comments · Fixed by #291
Closed

No handlers could be found for logger "smart_open.ssh" #288

piskvorky opened this issue Apr 12, 2019 · 2 comments · Fixed by #291
Assignees
Labels

Comments

@piskvorky
Copy link
Owner

piskvorky commented Apr 12, 2019

When importing the latest smart_open 1.8.1.

In [1]: import smart_open
No handlers could be found for logger "smart_open.ssh"

This is a bug: the library should not be logging anything at import-time. Logging is not configured yet at that time, and cannot be configured even in principle: configuring logging is up to the user, not the library.

The culprit seems to be here, introduced in #267:
https://github.com/RaRe-Technologies/smart_open/blob/master/smart_open/ssh.py#L33

We should be using warnings.warn instead.

Also (unrelated): the module lists me as the author, but I don't remember writing any of this code.

@mpenkov
Copy link
Collaborator

mpenkov commented Apr 15, 2019

Also (unrelated): the module lists me as the author, but I don't remember writing any of this code.

Strictly speaking, the comment at the top of the file lists you as the copyright owner, as required by the gensim contribution guidelines as opposed to the direct author of the code. If you like, I can add myself to the copyright statement to emphasize the joint copyright. The same thing goes for other modules.

Let me know how you'd like me to proceed with this.

mpenkov added a commit that referenced this issue Apr 16, 2019
* fix warning, fix #288 
* include VERSION in package_data, fix #289 
* fix #285, add special handling for question marks during url parsing
* add unit test, fix #47
@piskvorky
Copy link
Owner Author

piskvorky commented Apr 19, 2019

You're right, my bad, sorry.

I have a slight preference for including code author(s) as well (in addition to the copyright) in the header. This makes contacting authors in the future easier. More relevant in Gensim than here, TBH. But no big deal either way.

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

Successfully merging a pull request may close this issue.

2 participants