hello. I donit know what to to with this error:
![[Image: McUwGS.jpg]](https://snipboard.io/McUwGS.jpg)
What can I do, as not to apear that error again? Can anyone help me?
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 34: character maps to <undefined>This is the Python Code:
import fileinput
import glob
import os
import re
with open('c:\\Folder6\\merged.txt', 'w', encoding='UTF-8') as f:
for line in fileinput.input(sorted(glob.glob('c:\\Folder6\\*.txt'))):
f.write(line)
fileinput.close()
print(f)And this is the ERROR:Traceback (most recent call last):
File "E:\Carte\BB\17 - Site Leadership\alte\Ionel Balauta\Aryeht\Task 1 - Traduce tot site-ul\Doar Google Web\Andreea\Meditatii\Sedinta 31 august 2022\merge txt - versiune 3 .py", line 8, in <module>
for line in fileinput.input(sorted(glob.glob('c:\\Folder6\\*.txt'))):
File "C:\Program Files\Python39\lib\fileinput.py", line 256, in __next__
line = self._readline()
File "C:\Program Files\Python39\lib\fileinput.py", line 389, in _readline
return self._readline()
File "C:\Program Files\Python39\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 34: character maps to <undefined>This is a print screen:![[Image: McUwGS.jpg]](https://snipboard.io/McUwGS.jpg)
What can I do, as not to apear that error again? Can anyone help me?
