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

[Hangouts] KeyError: 'conversations' #68

Open
endersaka opened this issue Jul 29, 2020 · 2 comments
Open

[Hangouts] KeyError: 'conversations' #68

endersaka opened this issue Jul 29, 2020 · 2 comments

Comments

@endersaka
Copy link

Hi,

I tried:

$ python parse.py hangouts -f path/to/my/hangouts.json
2020-07-29 04:48:07,372 [INFO ] [parsers.hang]: Parsing Google Hangouts data...
2020-07-29 04:48:07,372 [INFO ] [parsers.hang]: Reading archive file path/to/my/hangouts.json...
2020-07-29 04:48:09,348 [INFO ] [parsers.hang]: Trying to infer own_name from data...
Traceback (most recent call last):
  File "parse.py", line 84, in <module>
    ArgParse()
  File "parse.py", line 42, in __init__
    getattr(self, args.command)()
  File "parse.py", line 60, in hangouts
    main(args.own_name, args.file_path, args.max)
  File "/path/to/Chatistics/parsers/hangouts.py", line 21, in main
    own_name = infer_own_name(archive)
  File "/path/to/Chatistics/parsers/hangouts.py", line 167, in infer_own_name
    for conversation in archive['conversations']:
KeyError: 'conversations'

Then, I tried:

$ python parse.py hangouts --own-name MARCO -f path/to/my/hangouts.json
2020-07-29 04:49:05,521 [INFO ] [parsers.hang]: Parsing Google Hangouts data...
2020-07-29 04:49:05,521 [INFO ] [parsers.hang]: Reading archive file path/to/my/hangouts.json...
2020-07-29 04:49:07,308 [INFO ] [parsers.hang]: Extracting messages...
Traceback (most recent call last):
  File "parse.py", line 84, in <module>
    ArgParse()
  File "parse.py", line 42, in __init__
    getattr(self, args.command)()
  File "parse.py", line 60, in hangouts
    main(args.own_name, args.file_path, args.max)
  File "/path/to/Chatistics/parsers/hangouts.py", line 22, in main
    data = parse_messages(archive, own_name)
  File "/path/to/Chatistics/parsers/hangouts.py", line 102, in parse_messages
    for conversation in archive['conversations']:
KeyError: 'conversations'

Then I tried to copy the file in ./raw_data/hangouts/, call python parse.py hangouts --own-name MARCO and got the same error.

@endersaka
Copy link
Author

Little update. I found out that the JSON I have has a different format than that described in the comment of function parse_messages(), in file ./parsers/hangout.py, line 36.

Therefore I am downloading my Hangouts backup from Google Takeout, once again, to see if anything has changed.

@endersaka
Copy link
Author

Resolved, Google has changed the JSON spec. Chatistics does not support old format, it seems.

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

1 participant