Требуется пропарсить vk по заданым параметрам и записать результат в файл на Python 3.5.
search_result = api.users.search(sort=sort_index, sex=sex_index, age_to=age_index, offset=offset_index, count=count_index, country=country)result = open('result.txt','a')while index != (count_index - offset_index): result.write(str(search_result[index + 1])) result.write('\n') index += 1result.close()Получаю ошибку:
Traceback (most recent call last): File ""E:***\vkscript.py"", line 19, in <module> result.write(str(search_result[index + 1])) File ""C:\Python\lib\encodings\cp1251.py"", line 19, in encode retu codecs.charmap_encode(input,self.errors,encoding_table)[0]UnicodeEncodeError: 'charmap' codec can't encode character '\u039a' in position 16: character maps to <undefined>
question@mail.ru
·