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

KeyError: 'from' #8

Open
danzerzine opened this issue May 9, 2022 · 3 comments
Open

KeyError: 'from' #8

danzerzine opened this issue May 9, 2022 · 3 comments

Comments

@danzerzine
Copy link

Hi, I've followed the instruction, but get the following error message, could you please point to possible solution?

importing raw data...
input data is a single chat export
calculating metrics...
Traceback (most recent call last):
  File "telegram-statistics.py", line 267, in <module>
    main()
  File "telegram-statistics.py", line 209, in main
    calculate_metrics(chat_data, date_filter)
  File "telegram-statistics.py", line 137, in calculate_metrics
    metrics = _message_numerics(chat_data, date_filter)
  File "/work/_message_numerics.py", line 24, in _message_numerics
    metrics["A"]["name"] = chat["messages"][1]["from"]
KeyError: 'from'
@aleks648
Copy link

I'm having the identical issue.

@mnemocron
Copy link
Owner

mnemocron commented Aug 1, 2022

What type of chat are you exporting @aleks648 and @danzerzine ?
Is it from a group, or a bot?
I just tested it with two different single chat exports and I cannot reproduce the problem.

@celgus
Copy link

celgus commented Nov 2, 2022

What type of chat are you exporting @aleks648 and @danzerzine ? Is it from a group, or a bot? I just tested it with two different single chat exports and I cannot reproduce the problem.

"type": "public_supergroup",

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

4 participants