You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "<string>", line 1, in <module>
UnicodeEncodeError: 'utf-8' codec can't encode character '\ud800' in position 0: surrogates not allowed
So the obvious™ thing to do is call msg.encode(errors='replace') or something.
I hope this is the actual cause of bpython#747.
window.py:43
currently says:self.out_stream.write(msg)
However, this fails when the arument is not encodable in the current encoding.
Here's how to reproduce this is in an Unicode environment:
Fails immediately with:
So the obvious™ thing to do is call
msg.encode(errors='replace')
or something.However:
msg
really always text?Those are questions I cannot answer by myself.
The text was updated successfully, but these errors were encountered: