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

UnicodeEncodeError: 'charmap' codec can't encode character '\u266b' in position 0: character maps to <undefined> #2671

Closed
lazka opened this Issue Dec 29, 2017 · 0 comments

Comments

Projects
None yet
1 participant
@lazka
Member

lazka commented Dec 29, 2017

https://sentry.io/quodlibet/quodlibet/issues/425426690/

UnicodeEncodeError: 'charmap' codec can't encode character '\u266b' in position 0: character maps to <undefined>
  File "quodlibet/browsers/_base.py", line 397, in _set_pattern
    browser.update_pattern(edit.text)
  File "quodlibet/browsers/_base.py", line 318, in update_pattern
    f.write(pattern_text + "\n")
  File "cp1252.py", line 19, in encode

UnicodeEncodeError: 'charmap' codec can't encode character '\u266b' in position 0: character maps to <undefined>

@lazka lazka added the sentry label Dec 29, 2017

@lazka lazka closed this in 396ee9e Jan 1, 2018

@lazka lazka added this to the 4.0.1 milestone Jan 4, 2018

lazka added a commit that referenced this issue Jan 10, 2018

Fix various places not specifying an encoding with open(). Fixes #2672.
Fixes #2671

So we do the same thing independent of the locale.
Also remove the universal newline flag, as it's the default with Python 3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment