ارور در ساخت ربات

سوال

آقا سلام من تازه وارد حوزه ربات نویسی شدم(برنامه نویس نیستم و جهت سرگرمی یه کارایی میکنم).
ببینید من با کمک یه ویدیو ربات نوشتم (با زبان پایتون در محیط PyCharm) دقیقا هم مثل همون ویدیو نوشتم ولی به یه سری ارور برخورد میکنم
ممنون میشم کمکم کنید

لازم به ذکر هست که من از ماژول telegram و python-telegram-bot استفاده کردم

ارورها:

Traceback (most recent call last):
File “F:projectinstavenvlibsite-packagestelegramvendorptb_urllib3urllib3connection.py”, line 140, in _new_conn
conn = connection.create_connection(
File “F:projectinstavenvlibsite-packagestelegramvendorptb_urllib3urllib3utilconnection.py”, line 83, in create_connection
raise err
File “F:projectinstavenvlibsite-packagestelegramvendorptb_urllib3urllib3utilconnection.py”, line 73, in create_connection
sock.connect(sa)
socket.timeout: timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “F:projectinstavenvlibsite-packagestelegramvendorptb_urllib3urllib3connectionpool.py”, line 614, in urlopen
httplib_response = self._make_request(conn, method, url,
File “F:projectinstavenvlibsite-packagestelegramvendorptb_urllib3urllib3connectionpool.py”, line 360, in _make_request
self._validate_conn(conn)
File “F:projectinstavenvlibsite-packagestelegramvendorptb_urllib3urllib3connectionpool.py”, line 857, in _validate_conn
super(HTTPSConnectionPool, self)._validate_conn(conn)
File “F:projectinstavenvlibsite-packagestelegramvendorptb_urllib3urllib3connectionpool.py”, line 289, in _validate_conn
conn.connect()
File “F:projectinstavenvlibsite-packagestelegramvendorptb_urllib3urllib3connection.py”, line 284, in connect
conn = self._new_conn()
File “F:projectinstavenvlibsite-packagestelegramvendorptb_urllib3urllib3connection.py”, line 144, in _new_conn
raise ConnectTimeoutError(
telegram.vendor.ptb_urllib3.urllib3.exceptions.ConnectTimeoutError: (<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x03905040>, ‘Connection to api.telegram.org timed out. (connect timeout=5.0)’)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File “F:projectinstavenvlibsite-packagestelegramutilsrequest.py”, line 259, in _request_wrapper
resp = self._con_pool.request(*args, **kwargs)
File “F:projectinstavenvlibsite-packagestelegramvendorptb_urllib3urllib3request.py”, line 68, in request
return self.request_encode_body(method, url, fields=fields,
File “F:projectinstavenvlibsite-packagestelegramvendorptb_urllib3urllib3request.py”, line 148, in request_encode_body
return self.urlopen(method, url, **extra_kw)
File “F:projectinstavenvlibsite-packagestelegramvendorptb_urllib3urllib3poolmanager.py”, line 244, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File “F:projectinstavenvlibsite-packagestelegramvendorptb_urllib3urllib3connectionpool.py”, line 691, in urlopen
return self.urlopen(method, url, body, headers, retries,
File “F:projectinstavenvlibsite-packagestelegramvendorptb_urllib3urllib3connectionpool.py”, line 691, in urlopen
return self.urlopen(method, url, body, headers, retries,
File “F:projectinstavenvlibsite-packagestelegramvendorptb_urllib3urllib3connectionpool.py”, line 691, in urlopen
return self.urlopen(method, url, body, headers, retries,
File “F:projectinstavenvlibsite-packagestelegramvendorptb_urllib3urllib3connectionpool.py”, line 665, in urlopen
retries = retries.increment(method, url, error=e, _pool=self,
File “F:projectinstavenvlibsite-packagestelegramvendorptb_urllib3urllib3utilretry.py”, line 376, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
telegram.vendor.ptb_urllib3.urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host=’api.telegram.org’, port=443): Max retries exceeded with url: /bot2099592810:AAE5mHW3DjDhdvwXUjKxDPBWURtODlo0iXk/getMe (Caused by ConnectTimeoutError(<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x03905040>, ‘Connection to api.telegram.org timed out. (connect timeout=5.0)’))

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “F:projectinstainstagram.py”, line 28, in <module>
updater.start_polling()
File “F:projectinstavenvlibsite-packagestelegramextupdater.py”, line 422, in start_polling
self._init_thread(self.dispatcher.start, “dispatcher”, ready=dispatcher_ready)
File “F:projectinstavenvlibsite-packagestelegramextupdater.py”, line 342, in _init_thread
name=f”Bot:{self.bot.id}:{name}”,
File “F:projectinstavenvlibsite-packagestelegrambot.py”, line 365, in id
return self.bot.id
File “F:projectinstavenvlibsite-packagestelegrambot.py”, line 359, in bot
self._bot = self.get_me()
File “F:projectinstavenvlibsite-packagestelegrambot.py”, line 130, in decorator
result = func(*args, **kwargs)
File “F:projectinstavenvlibsite-packagestelegrambot.py”, line 446, in get_me
result = self._post(‘getMe’, timeout=timeout, api_kwargs=api_kwargs)
File “F:projectinstavenvlibsite-packagestelegrambot.py”, line 295, in _post
return self.request.post(
File “F:projectinstavenvlibsite-packagestelegramutilsrequest.py”, line 356, in post
result = self._request_wrapper(
File “F:projectinstavenvlibsite-packagestelegramutilsrequest.py”, line 265, in _request_wrapper
raise NetworkError(f’urllib3 HTTPError {error}’) from error
telegram.error.NetworkError: urllib3 HTTPError HTTPSConnectionPool(host=’api.telegram.org’, port=443): Max retries exceeded with url: /bot2099592810:AAE5mHW3DjDhdvwXUjKxDPBWURtODlo0iXk/getMe (Caused by ConnectTimeoutError(<telegram.vendor.ptb_urllib3.urllib3.connection.VerifiedHTTPSConnection object at 0x03905040>, ‘Connection to api.telegram.org timed out. (connect timeout=5.0)’))

0
mohammadjavadgoli 2 ماه 0 پاسخ ها 33 دیده شده 0

ارسال یک پاسخ