[ ] The error is in the library's code, and not in my own.
[ ] I have searched for this issue before posting it and there isn't a duplicate.
[ ] I ran pip install -U https://github.com/LonamiWebs/Telethon/archive/v1.zip and triggered the bug in the latest version.
Code that causes the issue
from telethon.sync import TelegramClient
...
Traceback
Traceback (most recent call last):
2022-12-01 07:26:10,016 - telethon.network.mtprotosender - INFO - Connecting to 91.108.56.100:443/TcpFull...
2022-12-01 07:26:10,132 - telethon.network.mtprotosender - INFO - Connection to 91.108.56.100:443/TcpFull complete!
2022-12-01 07:26:12,617 - telethon.network.mtprotosender - INFO - Disconnecting from 91.108.56.100:443/TcpFull...
2022-12-01 07:26:12,618 - telethon.network.mtprotosender - INFO - Disconnection from 91.108.56.100:443/TcpFull complete!
Traceback (most recent call last):
File "c:\Users\sohan\OneDrive\Desktop\Token-Buy-Tracker-TelegramBot-main\tracker.py", line 141, in <module>
tracker()
File "c:\Users\sohan\OneDrive\Desktop\Token-Buy-Tracker-TelegramBot-main\tracker.py", line 129, in tracker
chat = BOT.get_entity(CHANNEL)
File "C:\Users\sohan\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\sync.py", line 39, in syncified
return loop.run_until_complete(coro)
File "C:\Users\sohan\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 649, in run_until_complete
return future.result()
File "C:\Users\sohan\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\client\users.py", line 335, in get_entity
result.append(await self._get_entity_from_string(x))
File "C:\Users\sohan\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\client\users.py", line 553, in _get_entity_from_string
result = await self(
File "C:\Users\sohan\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\client\users.py", line 30, in __call__
return await self._call(self._sender, request, ordered=ordered)
File "C:\Users\sohan\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\client\users.py", line 63, in _call
future = sender.send(request, ordered=ordered)
File "C:\Users\sohan\AppData\Local\Programs\Python\Python310\lib\site-packages\telethon\network\mtprotosender.py", line 177, in send
raise ConnectionError('Cannot send requests while disconnected')
ConnectionError: Cannot send requests while disconnected
Checklist
pip install -U https://github.com/LonamiWebs/Telethon/archive/v1.zip
and triggered the bug in the latest version.Code that causes the issue
Traceback