Get "UnicodeDecodeError" while processing a file
aaykut opened this issue · 0 comments
aaykut commented
Hello, I get the following error while processing a file:
C:\Users\test\Downloads>eml-extractor
PROCESSING FILE "C:\Users\test\Downloads\RE_ Narudžba 22_010.eml"
Traceback (most recent call last):
File "c:\users\test\appdata\local\programs\python\python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "c:\users\test\appdata\local\programs\python\python39\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\Users\test\AppData\Local\Programs\Python\Python39\Scripts\eml-extractor.exe\__main__.py", line 7, in <module>
File "c:\users\test\appdata\local\programs\python\python39\lib\site-packages\eml_extractor.py", line 101, in main
extract_attachments(file, destination=args.destination)
File "c:\users\test\appdata\local\programs\python\python39\lib\site-packages\eml_extractor.py", line 11, in extract_attachments
email_message = message_from_file(f, policy=policy.default)
File "c:\users\test\appdata\local\programs\python\python39\lib\email\__init__.py", line 54, in message_from_file
return Parser(*args, **kws).parse(fp)
File "c:\users\test\appdata\local\programs\python\python39\lib\email\parser.py", line 53, in parse
data = fp.read(8192)
File "c:\users\test\appdata\local\programs\python\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 0x8d in position 2425: character maps to <undefined>