adein / hangouts_to_sms

Google Hangouts SMS/MMS to XML converter
MIT License
31 stars 11 forks source link

hangouts_parser.py errors #8

Open onemodtwo opened 6 years ago

onemodtwo commented 6 years ago

It may be that Google Takeout has slightly altered the format of the Hangouts.json file. When I tried the code yesterday (4/11/2018), it failed. I needed to change three lines in hangouts_parser.py.

25: data.conversation_state ---> data.conversations 27: getattr(conversation_state, "conversation_state", None) ---> getattr(conversation_state, "conversation", None) 57: getattr(state, "event", None) ---> getattr(conversation_state, "events", None)

Otherwise, worked like a charm. Thanks for the great code.

Augestflex commented 6 years ago

Just a note that I had the same issue, however after fixing lines 25,27,57 things worked great! Thank you for that.

andrewdens commented 6 years ago

Thank you @onemodtwo that fixed my issues as well

pitcjd01 commented 6 years ago

Another note, I had a bunch of non-ascii characters in my hangouts export from various sources, including me (inserting an upside down exclamation mark here and there) or from automated sources.

I used the following command to scrape out all non-ascii characters: perl -pe's/[[:^ascii:]]//g' < input.txt > output.txt