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

Can't parse timstamp from Hangouts.json? #4

Open
bjodasso opened this issue Aug 25, 2016 · 1 comment
Open

Can't parse timstamp from Hangouts.json? #4

bjodasso opened this issue Aug 25, 2016 · 1 comment

Comments

@bjodasso
Copy link

Processing json file at Hangouts.json
Traceback (most recent call last):
File "gtalk_export.py", line 144, in
parse_json(args.json_location, args.name, args.email, args.timestamp_format)
File "gtalk_export.py", line 99, in parse_json
conversations = hangouts.hangoutsToArray(mydata, timestamp_format)
File "hangouts.py", line 218, in hangoutsToArray
messages.sort(cmp=lambda a,b: int(a['timestamp']) - int(b['timestamp']))
TypeError: comparison function must return int, not long

@coandco
Copy link
Owner

coandco commented Aug 26, 2016

Try editing hangouts.py line 218 and changing this:
messages.sort(cmp=lambda a,b: int(a['timestamp']) - int(b['timestamp']))
to this:
messages.sort(cmp=lambda a,b: int(int(a['timestamp']) - int(b['timestamp'])))

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