Coding problem when writing to the file: Unicodeencodeerror: 'Charmap' Codec Canat Encode Character '\ U039a'
📁 python
It is required to pair vk according to the specified parameters and write the result to the file on the python 3.5.
Search_Result = " API.USERS.SEARCH (sort = sort_index, sex = sex_index, age_to = Age_index, Offset = Offseet_index, Count = Count_index, Country = Country) result = Open ( 'result.txt' , ) white index! = (count_index - offseet_index): result.write ( str (search_result [index + 1 ])) result.write ( '\ n' ) index += 1 result.close () I get an error:
Traceback (Most Recent Call Last): File "" E: *** \ VKSCRIPT.PY "" , Line 19 , in & lt; module & gt; result.write ( str (search_result [index + 1 ]) file "" C: \ Python \ Lib \ ENCODINGS \ CP1251.PY "" , Line 19 , in encode Retu SPAN> CODECS.Charmap_encode ( input , self.errors, encuding_table) [ 0 ] unicodeencodeeroror: 'charmap' codec can '' 'tencode character' \ u039a