GithubHelp home page GithubHelp logo

Error loading contacts? about pyrogram HOT 11 CLOSED

pyrogram avatar pyrogram commented on May 8, 2024
Error loading contacts?

from pyrogram.

Comments (11)

delivrance avatar delivrance commented on May 8, 2024

To troubleshoot this you can try using client.add_contacts(...) with a list of max 5 or 10 contacts and see what happens.

from pyrogram.

 avatar commented on May 8, 2024

After 30 phone numbers downloaded in the account (in a cycle, 10 pieces each), the Telegram begins to return this:

Inquiry:

{
"_": "types.contacts.ImportedContacts",
"users": [],
"imported": [],
"retry_contacts": [
6535766553982053376,
6535766553982053380,
6535766553982053384,
6535766553982053388,
6535766553982053392,
6535766553982053396,
6535766553982053400,
6535766553982053404,
6535766553982053408,
6535766553982053412
],
"popular_invites": []
}

answer:

{
"_": "types.contacts.Contacts",
"users": [],
"saved_count": 79,
"contacts": []
}

from pyrogram.

delivrance avatar delivrance commented on May 8, 2024

@windx13 Okay, maybe your phone numbers are wrong, make sure you add the country code as well. Example: for Italy is 39, you need to prepend it to each number.

from pyrogram.

 avatar commented on May 8, 2024

@delivrance All numbers are indicated properly, in an international format. Some of them I checked manually - they are registered in Telegram. I understand that it's not in the library. I would like to know the cause of the error and how do I get what I want?

from pyrogram.

delivrance avatar delivrance commented on May 8, 2024

@windx13 It is not a real error, you are not getting any exception raised. Pyrogram successfully calls the method with the given arguments, and the server replies correctly, but with something I've never seen before. I don't know exactly what that retry_contacts full of the client_ids means.

Does the method gives you the same result even with a single phone number?

You can also try to call .add_contacts twice using the same single phone number and see what happens.

from pyrogram.

 avatar commented on May 8, 2024

@delivrance

552

Can this be somehow bypassed?

from pyrogram.

delivrance avatar delivrance commented on May 8, 2024

Wow. I'm surprised this very obscure parameter was documented in their docs. I really couldn't think about looking there knowing how old they are.

from pyrogram.

 avatar commented on May 8, 2024

@delivrance Previously, this was not. Phone numbers were successfully checked. And this month problems began. Is there anything you can do about this?

from pyrogram.

delivrance avatar delivrance commented on May 8, 2024

@windx13 Well, no... As you can read is Telegram itself that's having problems importing contacts and is telling you to please try again later because of "system limitation".

from pyrogram.

 avatar commented on May 8, 2024

@delivrance Got it. In this case, you will have to forget about checking telephone numbers. Thank you for the quick answers!

from pyrogram.

delivrance avatar delivrance commented on May 8, 2024

@windx13 I wish many other parameters were documented like this. We probably could have not find a solution without reading that and we would have gone mad seeing it suddenly worked again ^^

from pyrogram.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.