proseltd / Telepathy-Community

Public release of Telepathy, an OSINT toolkit for investigating Telegram chats.
MIT License
949 stars 133 forks source link

UnicodeEncodeError: 'charmap' codec can't encode characters in position 48-50: character maps to <undefined> #21

Closed pouling closed 1 year ago

pouling commented 2 years ago

Another encode error, latest telepathy and python version D:\telepathy\dump\Telepathy\telepathy>telepathy -t durov -c

  ______     __                 __  __
 /_  __/__  / /__  ____  ____ _/ /_/ /_  __  __
  / / / _ \/ / _ \/ __ \/ __ `/ __/ __ \/ / / /
 / / /  __/ /  __/ /_/ / /_/ / /_/ / / / /_/ /
/_/  \___/_/\___/ .___/\__,_/\__/_/ /_/\__, /
               /_/                    /____/
-- An OSINT toolkit for investigating Telegram chats.
-- Developed by @jordanwildon | Version 2.0.0.

[!] Performing comprehensive scan

[-] Fetching details for durov... ┬ Chat details ├ Title: Durov's Channel ├ Description: Thoughts from the Product Manager / CEO / Founder of Telegram. ├ Total participants: 651807 ├ Username: durov ├ URL: http://t.me/durov ├ Chat type: Channel ├ Chat id: 1006503122 ├ Access hash: xxxxxxxxxxxxxxx ├ Scam: False ├ First post date: 2015/10/28, 18:20 UTC └ Restrictions: None

[!] Calculating number of messages... [-] Fetching message archive... [-] Progress: |████████████████████| 155/155 [100%] in 1:29.5 (1.73/s) Traceback (most recent call last): File "D:\Users\xxxxxxxxx\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "D:\Users\xxxxxxxxx\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code exec(code, run_globals) File "D:\Users\xxxxxxxxx\AppData\Local\Programs\Python\Python310\Scripts\telepathy.exe__main.py", line 7, in File "D:\Users\xxxxxxxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 829, in call__ return self.main(args, kwargs) File "D:\Users\xxxxxxxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 782, in main rv = self.invoke(ctx) File "D:\Users\xxxxxxxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 1066, in invoke return ctx.invoke(self.callback, ctx.params) File "D:\Users\xxxxxxxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\click\core.py", line 610, in invoke return callback(args, **kwargs) File "D:\Users\xxxxxxxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\telepathy\telepathy.py", line 930, in cli client.loop.run_until_complete(main()) File "D:\Users\xxxxxxxxx\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 646, in run_until_complete return future.result() File "D:\Users\xxxxxxxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\telepathy\telepathy.py", line 761, in main c_archive.to_csv(archive_file, sep=';') File "D:\Users\xxxxxxxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\core\generic.py", line 3551, in to_csv return DataFrameRenderer(formatter).to_csv( File "D:\Users\xxxxxxxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\io\formats\format.py", line 1180, in to_csv csv_formatter.save() File "D:\Users\xxxxxxxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\io\formats\csvs.py", line 261, in save self._save() File "D:\Users\xxxxxxxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\io\formats\csvs.py", line 266, in _save self._save_body() File "D:\Users\xxxxxxxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\io\formats\csvs.py", line 304, in _save_body self._save_chunk(start_i, end_i) File "D:\Users\xxxxxxxxx\AppData\Local\Programs\Python\Python310\lib\site-packages\pandas\io\formats\csvs.py", line 315, in _save_chunk libwriters.write_csv_rows( File "pandas_libs\writers.pyx", line 55, in pandas._libs.writers.write_csv_rows File "D:\Users\xxxxxxxxx\AppData\Local\Programs\Python\Python310\lib\encodings\cp1252.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_table)[0] UnicodeEncodeError: 'charmap' codec can't encode characters in position 48-50: character maps to

proseltd commented 1 year ago

I'm assuming this is to do with operating Telepathy on Windows, which isn't natively supported. I'll try and get to the bottom of this. A similar issue was previously fixed by specifying UTF-8 encoding but that doesn't seem to have solved it. I'll investigate further if the problem persists in 2.1.10.