-
Notifications
You must be signed in to change notification settings - Fork 733
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
Remove sys.setdefaultencoding #1963
Comments
@rtibbles just curious, how did you recall this issue? Also, @ralphiee22 can you clarify why this was needed since your commit comment is "Fly by fixes for kolibri and tasks." ;) |
@benjaoming it was on the Kolibri Tasks trello board, on the |
@benjaoming unicode decode/encode hell? Can't recall if because strings were not coming in as unicode or python was not reading them as unicode. |
Since this is so clearly discouraged, I'll try removing it and see what happens. Then we can add encoding and decoding fixes where they are needed - to have an explicit handling of wrong encodings and possibly track them down to their source. IMO the only way to deal with encoding issues is at the source, the possible issues that are mentioned in the StackOverflow answer do not sound nice to try and track down... especially in some distant future where maintaining Python 2.7 support is a terrible burden to someone. I suggest:
|
Note that the location of this code has now migrated to: https://github.com/learningequality/kolibri/blob/release-v0.14.x/kolibri/utils/env.py#L63 I think the simplest solution to this issue, may be just to handle it when we eventually drop Python 2 support. |
Fixed in #11654 |
Summary
(filled in by @benjaoming)
As I comment on ba2a383
The text was updated successfully, but these errors were encountered: