Closed ahmedbatty closed 1 year ago
Hi @ahmedbatty, many thanks for reporting this! Would you mind sharing the format of the messages in your logfile?
Hi @joweich see the following message format:
11/16/22, 12:18 AM - Ahmed: <message>
11/16/22, 12:18 AM - Ahmed: <Media omitted>
11/16/22, 12:19 AM - Ahmed: <message>
@ahmedbatty this format is covered in our test cases and I can't reproduce the issue. For me, the three example messages are parsed perfectly fine. Are you running the latest version of chatminer (0.3.0)? You can confirm via
import chatminer
print(chatminer.__version__)
If you are already running 0.3.0, there is some formatting in your chatlog that we don't yet catch. I would then need your support to identify the lines that cause the issue.
@joweich Running the latest version:
Let me know how I can help you out.
@ahmedbatty I temporally added a debugging output in #93. This should help us identifying the lines that break the parser. Please use the code in this PR and try to parse your logfile. The console output will show what we don't yet catch. Thank you!
@joweich I used the code from https://github.com/joweich/chat-miner/pull/93 and was able to parse my chat log successfully. See the following output:
27.04.2023 23:16:13 INFO
Depending on the platform, the message format in chat logs might not be
standardized accross devices/versions/localization and might change over
time. Please report issues including your message format via GitHub.
27.04.2023 23:16:13 INFO Initialized parser.
27.04.2023 23:16:13 INFO Starting reading raw messages...
27.04.2023 23:16:13 INFO Inferred date format: month/day/year
27.04.2023 23:16:13 INFO Finished reading 39999 raw messages.
27.04.2023 23:16:13 INFO Starting parsing raw messages...
27.04.2023 23:16:13 WARNING Failed to parse message: 4/22/23, 11:15 AM - Ahmed:. Skipped.
100%|█████████████████████████████████████████████████████████████████████████| 39999/39999 [00:02<00:00, 14467.43it/s]
27.04.2023 23:16:16 INFO Finished parsing raw messages.
So I tracked down the message that failed to parse and found out:
view only once
in WhatsApp.Thanks for drilling this down! I will provide a fix for this 👍🏼
Seeing the following error while using the WhatsApp parser:
Might be because of a format that is not being covered.