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
Python 3.4 64bit Winows 10
Although the message was sent successfully, the program throws an exception as following:
Traceback (most recent call last):
sent = client.send(friend.uid, u"\u4e00")
File "C:\Python34\lib\site-packages\fbchat\client.py", line 292, in send
print(data)
File "C:\Python34\lib\encodings\cp850.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 731-743: character maps to
The text was updated successfully, but these errors were encountered:
This is actually a limitation your terminal's output encoding. Python tries to print out the message for debugging purposes, but can't find a way to print \u4e00 to a Windows terminal. Changing your output encoding (or turning debugging off) should fix it.
That happened to me when I was creating my chat. I used windows 8 at that time, but as @dstelzer said that's a problem with the cmd. All you have to do is changing encoding on print.
I fixed it like so: fbchat-terminal/chat.py.
Python 3.4 64bit Winows 10
Although the message was sent successfully, the program throws an exception as following:
Traceback (most recent call last):
sent = client.send(friend.uid, u"\u4e00")
File "C:\Python34\lib\site-packages\fbchat\client.py", line 292, in send
print(data)
File "C:\Python34\lib\encodings\cp850.py", line 19, in encode
return codecs.charmap_encode(input,self.errors,encoding_map)[0]
UnicodeEncodeError: 'charmap' codec can't encode characters in position 731-743: character maps to
The text was updated successfully, but these errors were encountered: