0
I’m trying to do a translation with the Googletrans api(https://pypi.org/project/googletrans/). Code:
# -*- coding: utf-8 -*-
from googletrans import Translator
translator = Translator()
print translator.translate('hello', dest='pt')
I get the error:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 35:
ordinal not in range(128)
Can you help me with this question? I’m using PYTHON 2.7
Unicodeencode: 'charmap' codec can’t Encode characters in position 114-115: Character maps to <Undefined> And if this occurs?
– Luan pedro