LonamiWebs / Telethon

Pure Python 3 MTProto API Telegram client library, for bots too!
https://docs.telethon.dev
MIT License
9.77k stars 1.39k forks source link

telethon.errors.rpcerrorlist.UserIdInvalidError #1239 #1496

Closed bilalahmed-125 closed 4 years ago

bilalahmed-125 commented 4 years ago

Checklist

Code that causes the issue

from telethon.sync import TelegramClient
...

Traceback

Traceback (most recent call last):
  File "code.py", line 1, in <code>
bilalahmed-125 commented 4 years ago

This is the error I'm facing while adding members to group from multi accounts.

Traceback (most recent call last): File "C:/Users/Hp/PycharmProjects/Telegram Group Members/Test.py", line 138, in client(InviteToChannelRequest(target_group_entity, [user_to_add])) File "C:\Users\Hp\PycharmProjects\Telegram Group Members\venv\lib\site-packages\telethon\sync.py", line 39, in syncified return loop.run_until_complete(coro) File "C:\Users\Hp\AppData\Local\Programs\Python\Python37-32\lib\asyncio\base_events.py", line 579, in run_until_complete return future.result() File "C:\Users\Hp\PycharmProjects\Telegram Group Members\venv\lib\site-packages\telethon\client\users.py", line 30, in call return await self._call(self._sender, request, ordered=ordered) File "C:\Users\Hp\PycharmProjects\Telegram Group Members\venv\lib\site-packages\telethon\client\users.py", line 77, in _call result = await future telethon.errors.rpcerrorlist.UserIdInvalidError: Invalid object ID for a user. Make sure to pass the right types, for instance making sure that the request is designed for users or otherwise look for a different one more suited (caused by InviteToChannelRequest)

Lonami commented 4 years ago

The checklist items should be checked before posting an issue:

Closing as duplicate and not a bug.