Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

false negatives in parsing messages in tests #10

Open
manu-chroma opened this issue Jan 4, 2017 · 4 comments
Open

false negatives in parsing messages in tests #10

manu-chroma opened this issue Jan 4, 2017 · 4 comments

Comments

@manu-chroma
Copy link
Collaborator

hey,
the program wasn't working for me until i commented this loop
https://github.com/nmoya/whatsapp-parser/blob/master/parsers/whatsapp.py#L23

it gives false negatives when running with tests/testChat3.txt
can you please fix the loop. i think the len() comparison is not quite right.

thanks.

@nmoya
Copy link
Owner

nmoya commented Jan 5, 2017

@manu-chroma yeah, I will remove this if. I think this doesn't make sense anymore since the messages formatting may have changed slightly. I wish I have written unit tests :(

@manu-chroma
Copy link
Collaborator Author

I was wondering how to check if the given line is valid or not. should we use regex for that or something else.
given the date change based on locale, len check won't work.

this would be needed in the new parser also.

@manu-chroma
Copy link
Collaborator Author

should i remove the len() check and put parsing of message in try/except block. it'll give an error when it won't be able to generate a datetime object.
it's dirty hack for this version, which i'll fix in the new parser. thoughts ?

@nmoya
Copy link
Owner

nmoya commented Jan 6, 2017

@manu-chroma Yeah, I think this is a good approach, since I don't remember what is an invalid line anymore to write the regex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants