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

Message missing text #1398

Open
3 tasks done
barbamento opened this issue Feb 28, 2024 · 5 comments
Open
3 tasks done

Message missing text #1398

barbamento opened this issue Feb 28, 2024 · 5 comments

Comments

@barbamento
Copy link

barbamento commented Feb 28, 2024

Checklist

  • I am sure the error is coming from Pyrogram's code and not elsewhere
  • I have searched in the issue tracker for similar bug reports, including closed ones
  • I ran pip3 install -U https://github.com/pyrogram/pyrogram/archive/master.zip and reproduced the issue using the latest development version

Description

Some messages have no information about the text.

Steps to reproduce

I tried to download some messages and they have no text in appropriate field.
To be sure that it was a problem of pyrogram i used different accounts and also test the message with telethon.

This is a message for reference https://t.me/c/1800268404/1643990

Doing some tests it seems that the problematic messages are the modified one, but I cannot be sure about that

Code example

from pyrogram import Client

Client(
   name=*phone_number*, 
   api_id=*api_id*, 
   api_hash=*api_hash*,
)

with app:
   print(app.get_messages(-1001800268404, 1643990))

Logs

This is the result with pyrogram : 
{
    "_": "Message",
    "id": 1643990,
    "from_user": {
       
    },
    "date": "2024-02-27 15:06:17",
    "chat": {
        
    },
    "mentioned": false,
    "scheduled": false,
    "from_scheduled": false,
    "edit_date": "2024-02-27 15:08:13",
    "has_protected_content": false,
    "outgoing": false,
    "reactions": {
        "_": "MessageReactions",
        "reactions": [
            {
                "_": "Reaction",
                "emoji": "🙈",
                "count": 1
            }
        ]
    }
}

This is the one from telethon : {
    "_":"Message",
    "id":1643990,
    "peer_id":{
    },
    "date":"",
    "message":"Дефицит товаров в ссср был все 70 лет его существования\n\nЕго не было только в советском кино и то лишь потому что советское население не имело возможности до 80-ых смотреть кино иностранное\n\nФильм Терминатор 1 и 2 и другие, точнее их антураж и уличные настоящие декорации, снимаемые в реальных городах США,на самом деле и уничтожили советскую корпорацию\n\nЕсли бы ваша дочь работала для  сотрудников Сколково, то не получала бы 34 000 рублей, а сама давно работала на частные иследовательские центры и компании Сколково, которых год от года там всё больше и получала 340 000",
    "out":false,
    "mentioned":false,
    "media_unread":false,
    "silent":false,
    "post":false,
    "from_scheduled":false,
    "legacy":false,
    "edit_hide":false,
    "pinned":false,
    "noforwards":false,
    "invert_media":false,
    "from_id":{
    },
    "saved_peer_id":"None",
    "fwd_from":"None",
    "via_bot_id":"None",
    "reply_to":{
    },
    "media":"None",
    "reply_markup":"None",
    "entities":[
        
    ],
    "views":"None",
    "forwards":"None",
    "replies":"None",
    "edit_date":"",
    "post_author":"None",
    "grouped_id":"None",
    "reactions":{
        "_":"MessageReactions",
        "results":[
            {
                "_":"ReactionCount",
                "reaction":{
                    "_":"ReactionEmoji",
                    "emoticon":"🙈"
                },
                "count":1,
                "chosen_order":"None"
            }
        ],
        "min":false,
        "can_see_list":true,
        "reactions_as_tags":false,
        "recent_reactions":[
            {
                "_":"MessagePeerReaction",
                "peer_id":{
                    "_":"PeerUser",
                    "user_id":1924031957
                },
                "date":"",
                "reaction":{
                    "_":"ReactionEmoji",
                    "emoticon":"🙈"
                },
                "big":false,
                "unread":false,
                "my":false
            }
        ]
    },
    "restriction_reason":[
        
    ],
    "ttl_period":"None"
}

Edit: formatted the json

@bayanistnahtc
Copy link

I encountered the same problem, the field with message text is just None. Apparently, Telegram API has been updated many times, and this project seems to be abandoned since April 2022. It seems, we should look for an alternative. Have you tried alternatives yer? Any recommendations?

@bayanistnahtc
Copy link

image

Of course, I don't see a direct connection here, but on February 16 Telegram API made changes, including Message class, maybe there is some connection with it

@bayanistnahtc
Copy link

Based on my data, this behavior started on February 8th.

@bayanistnahtc
Copy link

I have tested this fork of the pyrogram: https://github.com/KurimuzonAkuma/pyrogram
In this version there is no problem with missing values in the text field. Maybe it will be useful for you.

@barbamento
Copy link
Author

I have tested this fork of the pyrogram: https://github.com/KurimuzonAkuma/pyrogram In this version there is no problem with missing values in the text field. Maybe it will be useful for you.

Sorry for the delay. I also swithced to that fork. I love that it also has an active comunity behind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants