Untitled

 avatar
unknown
python
a year ago
11 kB
6
Indexable
C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\python.exe C:\Users\ALGHAZILOPTOP\Desktop\python-Automation-projects-main\py_telegram_bot.py 
Starting Bot....
Polling...
Traceback (most recent call last):
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\anyio\streams\tls.py", line 140, in _call_sslobject_method
    result = func(*args)
             ^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\ssl.py", line 917, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLWantReadError: The operation did not complete (read) (_ssl.c:1000)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\anyio\_core\_tasks.py", line 115, in fail_after
    yield cancel_scope
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpcore\_backends\anyio.py", line 69, in start_tls
    ssl_stream = await anyio.streams.tls.TLSStream.wrap(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\anyio\streams\tls.py", line 132, in wrap
    await wrapper._call_sslobject_method(ssl_object.do_handshake)
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\anyio\streams\tls.py", line 147, in _call_sslobject_method
    data = await self.transport_stream.receive()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\anyio\_backends\_asyncio.py", line 1123, in receive
    await self._protocol.read_event.wait()
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\asyncio\locks.py", line 212, in wait
    await fut
asyncio.exceptions.CancelledError: Cancelled by cancel scope 17e42ba7440

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpcore\_exceptions.py", line 10, in map_exceptions
    yield
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpcore\_backends\anyio.py", line 78, in start_tls
    raise exc
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpcore\_backends\anyio.py", line 68, in start_tls
    with anyio.fail_after(timeout):
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\contextlib.py", line 155, in __exit__
    self.gen.throw(value)
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\anyio\_core\_tasks.py", line 118, in fail_after
    raise TimeoutError
TimeoutError

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

Traceback (most recent call last):
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpx\_transports\default.py", line 67, in map_httpcore_exceptions
    yield
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpx\_transports\default.py", line 371, in handle_async_request
    resp = await self._pool.handle_async_request(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpcore\_async\connection_pool.py", line 268, in handle_async_request
    raise exc
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpcore\_async\connection_pool.py", line 251, in handle_async_request
    response = await connection.handle_async_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpcore\_async\connection.py", line 99, in handle_async_request
    raise exc
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpcore\_async\connection.py", line 76, in handle_async_request
    stream = await self._connect(request)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpcore\_async\connection.py", line 156, in _connect
    stream = await stream.start_tls(**kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpcore\_backends\anyio.py", line 66, in start_tls
    with map_exceptions(exc_map):
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\contextlib.py", line 155, in __exit__
    self.gen.throw(value)
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpcore\_exceptions.py", line 14, in map_exceptions
    raise to_exc(exc) from exc
httpcore.ConnectTimeout

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

Traceback (most recent call last):
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\telegram\request\_httpxrequest.py", line 268, in do_request
    res = await self._client.request(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpx\_client.py", line 1559, in request
    return await self.send(request, auth=auth, follow_redirects=follow_redirects)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpx\_client.py", line 1646, in send
    response = await self._send_handling_auth(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpx\_client.py", line 1674, in _send_handling_auth
    response = await self._send_handling_redirects(
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpx\_client.py", line 1711, in _send_handling_redirects
    response = await self._send_single_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpx\_client.py", line 1748, in _send_single_request
    response = await transport.handle_async_request(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpx\_transports\default.py", line 370, in handle_async_request
    with map_httpcore_exceptions():
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\contextlib.py", line 155, in __exit__
    self.gen.throw(value)
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\httpx\_transports\default.py", line 84, in map_httpcore_exceptions
    raise mapped_exc(message) from exc
httpx.ConnectTimeout

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

Traceback (most recent call last):
  File "C:\Users\ALGHAZILOPTOP\Desktop\python-Automation-projects-main\py_telegram_bot.py", line 92, in <module>
    app.run_polling(poll_interval=5)  # for 5 seconds
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\telegram\ext\_application.py", line 836, in run_polling
    return self.__run(
           ^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\telegram\ext\_application.py", line 1036, in __run
    raise exc
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\telegram\ext\_application.py", line 1025, in __run
    loop.run_until_complete(self.initialize())
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\asyncio\base_events.py", line 664, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\telegram\ext\_application.py", line 495, in initialize
    await self.bot.initialize()
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\telegram\ext\_extbot.py", line 293, in initialize
    await super().initialize()
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\telegram\_bot.py", line 768, in initialize
    await self.get_me()
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\telegram\ext\_extbot.py", line 1873, in get_me
    return await super().get_me(
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\telegram\_bot.py", line 542, in decorator
    result = await func(self, *args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\telegram\_bot.py", line 903, in get_me
    result = await self._post(
             ^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\telegram\_bot.py", line 630, in _post
    return await self._do_post(
           ^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\telegram\ext\_extbot.py", line 347, in _do_post
    return await super()._do_post(
           ^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\telegram\_bot.py", line 658, in _do_post
    return await request.post(
           ^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\telegram\request\_baserequest.py", line 200, in post
    result = await self._request_wrapper(
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\telegram\request\_baserequest.py", line 340, in _request_wrapper
    raise exc
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\telegram\request\_baserequest.py", line 330, in _request_wrapper
    code, payload = await self.do_request(
                    ^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\ALGHAZILOPTOP\AppData\Local\Programs\Python\Python312\Lib\site-packages\telegram\request\_httpxrequest.py", line 285, in do_request
    raise TimedOut from err
telegram.error.TimedOut: Timed out

Process finished with exit code 1
Leave a Comment