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

Usernames issue (not updating on import causing duplicated userID entries) #26

Open
eiger8 opened this issue Oct 24, 2023 · 4 comments
Open

Comments

@eiger8
Copy link

eiger8 commented Oct 24, 2023

Hello @mkdryden

After importing the chat history the usernames are not updated by UserID accordingly, causing the stats to show not correctly (i.e. with empty fields).
Telegram 2023-10-24 at 20 40 43@2x

When the user appears in chat, and writes some messages the username gets updated (by UserID), but this action is leading to user record duplication
TablePlus 2023-10-24 at 21 55 37@2x

Here is stdout in container when running /stats corr
Safari 2023-10-24 at 21 57 26@2x

@mkdryden
Copy link
Owner

mkdryden commented Nov 5, 2023

So it is totally normal to have multiple entries in the user_names table for a given user id, as it keeps track of historical display names. When mapping user ids to display names when doing stats, it is supposed to take the most recent one.

The error at the bottom is because the dataframe has duplicate indices. I will have to investigate closer and see what the index is supposed to be there, but I don't seem to be able to reproduce this issue with freshly dumped chat logs on my end.

@eiger8
Copy link
Author

eiger8 commented Nov 5, 2023

What data or any other help do you need from me to investigate the issue?

@mkdryden
Copy link
Owner

mkdryden commented Nov 6, 2023

A database dump would probably be the most helpful, if you can make one that reproduces this issue. Knowing how your server is running would be good to know as well, particularly the install method (source using poetry, pip, docker).

@eiger8
Copy link
Author

eiger8 commented Nov 30, 2023

A database dump would probably be the most helpful, if you can make one that reproduces this issue. Knowing how your server is running would be good to know as well, particularly the install method (source using poetry, pip, docker).

I am running bot in docker. Config is almost like default one in repo but has persistant volumes for DB and bot (for importing, experiments). Chat is private so full DB dump will not be possible.

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