-
Notifications
You must be signed in to change notification settings - Fork 11
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
File warning instead of fail if stdout does not have encoding #37
Comments
Could be fixed by removing check_encoding as suggested here #36 |
Several frameworks are known to monkeypatch stdout with class that does not have "encoding" field. We must survive this case.
Does the solution of #36 work for you? Also thank you for the pull request, but I'll probably add something like
So, |
Note that I have also had an issue with this problem when using py2exe on code that uses this module. (It has a Blackhole class that substitutes for sys.stdout and doesn't have an encoding property) In my case I found that getattr(sys.stdout, "encoding", None) worked fine. |
@GadgetSteve Is a warning ok for you? |
@Drekin A clear warning is always better than a crash. |
According to Python manual
sys.stdout
should haveencoding
.Unfortunatelly,
nose
monekypatches it withStringIO
with out of encoding.See: nose-devs/nose#1065
Its nose fault, not win-unicode-console fault. But can we please do
?
The text was updated successfully, but these errors were encountered: