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

Help me to fix this issue #10

Open
Ayus444 opened this issue Aug 11, 2024 · 0 comments
Open

Help me to fix this issue #10

Ayus444 opened this issue Aug 11, 2024 · 0 comments

Comments

@Ayus444
Copy link

Ayus444 commented Aug 11, 2024

Facing this issue while running start or other commands:
Uploading Screenshot_20240811-222259.png…
Uploading Screenshot_20240811-222259.png…

[ERROR/2024-08-11 16:50:42,447] asyncio: Task exception was never retrieved future: <Task finished name='Task-194' coro=<UpdateMethods._dispatch_update() done, defined at /usr/local/lib/python3.10/dist-packages/telethon/client/updates.py:514> exception=ValueError('Cannot get entity by phone number as a bot (try using integer IDs, not strings)')> Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/telethon/client/users.py", line 530, in _get_entity_from_string for user in (await self( File "/usr/local/lib/python3.10/dist-packages/telethon/client/users.py", line 30, in call return await self._call(self._sender, request, ordered=ordered) File "/usr/local/lib/python3.10/dist-packages/telethon/client/users.py", line 87, in _call result = await future telethon.errors.rpcerrorlist.BotMethodInvalidError: The API access for bot users is restricted. The method you tried to invoke cannot be executed as a bot (caused by GetContactsRequest) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/telethon/client/updates.py", line 554, in _dispatch_update await builder.resolve(self) File "/usr/local/lib/python3.10/dist-packages/telethon/events/common.py", line 99, in resolve await self._resolve(client) File "/usr/local/lib/python3.10/dist-packages/telethon/events/newmessage.py", line 94, in _resolve self.from_users = await _into_id_set(client, self.from_users) File "/usr/local/lib/python3.10/dist-packages/telethon/events/common.py", line 33, in _into_id_set chat = await client.get_input_entity(chat) File "/usr/local/lib/python3.10/dist-packages/telethon/client/users.py", line 438, in get_input_entity await self._get_entity_from_string(peer)) File "/usr/local/lib/python3.10/dist-packages/telethon/client/users.py", line 535, in _get_entity_from_string raise ValueError('Cannot get entity by phone number as a ' ValueError: Cannot get entity by phone number as a bot (try using integer IDs, not strings) [ERROR/2024-08-11 16:50:43,647] asyncio: Task exception was never retrieved future: <Task finished name='Task-223' coro=<UpdateMethods._dispatch_update() done, defined at /usr/local/lib/python3.10/dist-packages/telethon/client/updates.py:514> exception=ValueError('Cannot get entity by phone number as a bot (try using integer IDs, not strings)')> Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/telethon/client/users.py", line 530, in _get_entity_from_string for user in (await self( File "/usr/local/lib/python3.10/dist-packages/telethon/client/users.py", line 30, in call return await self._call(self._sender, request, ordered=ordered) File "/usr/local/lib/python3.10/dist-packages/telethon/client/users.py", line 87, in _call result = await future telethon.errors.rpcerrorlist.BotMethodInvalidError: The API access for bot users is restricted. The method you tried to invoke cannot be executed as a bot (caused by GetContactsRequest) During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/telethon/client/updates.py", line 554, in _dispatch_update await builder.resolve(self) File "/usr/local/lib/python3.10/dist-packages/telethon/events/common.py", line 99, in resolve await self._resolve(client) File "/usr/local/lib/python3.10/dist-packages/telethon/events/newmessage.py", line 94, in _resolve self.from_users = await _into_id_set(client, self.from_users) File "/usr/local/lib/python3.10/dist-packages/telethon/events/common.py", line 33, in _into_id_set chat = await client.get_input_entity(chat) File "/usr/local/lib/python3.10/dist-packages/telethon/client/users.py", line 438, in get_input_entity await self._get_entity_from_string(peer)) File "/usr/local/lib/python3.10/dist-packages/telethon/client/users.py", line 535, in _get_entity_from_string raise ValueError('Cannot get entity by phone number as a ' ValueError: Cannot get entity by phone number as a bot (try using integer IDs, not strings)

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

1 participant