chat-miner
chat-miner copied to clipboard
Unknown String format
While trying to parse a chat exported from a Phone in India,
raise ParserError("Unknown string format: %s", timestr)
dateutil.parser._parser.ParserError: Unknown string format: 7.9.2020
Is this the full error message? Unfortunately, I could not reproduce the issue with the information provided. I tested successfully with this chat log:
7.9.2020, 11:23 - Author A: Message A 7.9.2020, 11:24 - Author B: Message B
here it is
WARNING:chatminer.chatparsers.WhatsAppParser.2215361640912:Can't infer dateformat. No message with day > 12. Assuming day first.
Traceback (most recent call last):
File "c:/Users/Documents/Projects/chat-miner/analyze.py", line 4, in <module>
parser.parse_file_into_df()
File "c:\Users\Documents\Projects\chat-miner\chatminer\chatparsers.py", line 28, in parse_file_into_df
parsed_mess = self._parse_message(mess)
File "c:\Users\Documents\Projects\chat-miner\chatminer\chatparsers.py", line 88, in _parse_message
datetime = datetimeparser.parse(mess.split('-', 1)[0],
File "C:\Users\AppData\Local\Programs\Python\Python38\lib\site-packages\dateutil\parser\_parser.py", line 1374, in parse
return DEFAULTPARSER.parse(timestr, **kwargs)
File "C:\Users\AppData\Local\Programs\Python\Python38\lib\site-packages\dateutil\parser\_parser.py", line 649, in parse
raise ParserError("Unknown string format: %s", timestr)
dateutil.parser._parser.ParserError: Unknown string format: 7.9.2020 AAAA
Would you mind copy-pasting 2-3 anonymized lines from your chat logfile? I can't infer the formatting of your messages from the error message unfortunately.