You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello;
The method self._invoke(call_receive, *requests) in "telegram_bare_client.py" returns None s the function "call(self, *requests, retries=5):" raise an exception.
1-I did "pip3 install --upgrade telethon" so the telethon is updated
2-I'm using api_id,api_hash btained from "https://my.telegram.org"
3-The windws 10 firewall is turned off.
4-I can open the telegram application smoothly..
This is my code:
from telethon import TelegramClient
from telethon.tl.functions.contacts import ResolveUsernameRequest
from telethon.tl.functions.channels import GetAdminLogRequest
from telethon.tl.functions.channels import GetParticipantsRequest
from telethon.tl.types import ChannelParticipantsRecent
from telethon.tl.types import InputChannel
from telethon.tl.types import ChannelAdminLogEventsFilter
from telethon.tl.types import InputUserSelf
from telethon.tl.types import InputUser
# These example values won't work. You must get your own api_id and
# api_hash from https://my.telegram.org, under API Development.
api_id = xxxxxx
api_hash = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
phone_number = '+xxxxxxxxxxxx'
client = TelegramClient(phone_number, api_id, api_hash)
print(client)
client.session.report_errors = False
client.connect()
if not client.is_user_authorized():
client.send_code_request(phone_number)
client.sign_in(phone_number, input('Enter the code: '))
channel = client(ResolveUsernameRequest('channelusername')) # Your channel username
and this is the exception:
Traceback (most recent call last): File "a.py", line 25, in <module> client.connect() File "C:\Program Files\Python36\lib\site-packages\telethon\telegram_bare_client.py", line 202, in connect self.sync_updates() File "C:\Program Files\Python36\lib\site-packages\telethon\telegram_bare_client.py", line 581, in sync_updates self.updates.process(self(GetStateRequest())) File "C:\Program Files\Python36\lib\site-packages\telethon\telegram_bare_client.py", line 456, in __call__ self._reconnect() File "C:\Program Files\Python36\lib\site-packages\telethon\telegram_bare_client.py", line 276, in _reconnect return self.connect() File "C:\Program Files\Python36\lib\site-packages\telethon\telegram_bare_client.py", line 202, in connect self.sync_updates() File "C:\Program Files\Python36\lib\site-packages\telethon\telegram_bare_client.py", line 581, in sync_updates self.updates.process(self(GetStateRequest())) File "C:\Program Files\Python36\lib\site-packages\telethon\telegram_bare_client.py", line 458, in __call__ raise RuntimeError('Number of retries reached 0.') RuntimeError: Number of retries reached 0.
The text was updated successfully, but these errors were encountered:
Hello;
The method self._invoke(call_receive, *requests) in "telegram_bare_client.py" returns None s the function "call(self, *requests, retries=5):" raise an exception.
1-I did "pip3 install --upgrade telethon" so the telethon is updated
2-I'm using api_id,api_hash btained from "https://my.telegram.org"
3-The windws 10 firewall is turned off.
4-I can open the telegram application smoothly..
This is my code:
and this is the exception:
Traceback (most recent call last): File "a.py", line 25, in <module> client.connect() File "C:\Program Files\Python36\lib\site-packages\telethon\telegram_bare_client.py", line 202, in connect self.sync_updates() File "C:\Program Files\Python36\lib\site-packages\telethon\telegram_bare_client.py", line 581, in sync_updates self.updates.process(self(GetStateRequest())) File "C:\Program Files\Python36\lib\site-packages\telethon\telegram_bare_client.py", line 456, in __call__ self._reconnect() File "C:\Program Files\Python36\lib\site-packages\telethon\telegram_bare_client.py", line 276, in _reconnect return self.connect() File "C:\Program Files\Python36\lib\site-packages\telethon\telegram_bare_client.py", line 202, in connect self.sync_updates() File "C:\Program Files\Python36\lib\site-packages\telethon\telegram_bare_client.py", line 581, in sync_updates self.updates.process(self(GetStateRequest())) File "C:\Program Files\Python36\lib\site-packages\telethon\telegram_bare_client.py", line 458, in __call__ raise RuntimeError('Number of retries reached 0.') RuntimeError: Number of retries reached 0.
The text was updated successfully, but these errors were encountered: