• Как исправить ошибки с библиотеками телеграм бота?

    @Dex9er Автор вопроса
    Я уже установил библиотеки, но все равно выдаёт ошибку(
    Traceback (most recent call last):
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiohttp/connector.py", line 986, in _wrap_create_connection
        return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
      File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection
        raise exceptions[0]
      File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
        sock = await self._connect_sock(
      File "/usr/local/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
        await self.sock_connect(sock, address)
      File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
        return await fut
      File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 507, in _sock_connect
        sock.connect(address)
    OSError: [Errno 101] Network is unreachable
    The above exception was the direct cause of the following exception:
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
    
    Traceback (most recent call last):
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiogram/bot/api.py", line 139, in make_request
        async with session.post(url, data=req, **kwargs) as response:
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiohttp/client.py", line 1138, in __aenter__
        self._resp = await self._coro
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiohttp/client.py", line 535, in _request
        conn = await self._connector.connect(
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiohttp/connector.py", line 542, in connect
        proto = await self._create_connection(req, traces, timeout)
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiohttp/connector.py", line 907, in _create_connection
        _, proto = await self._create_direct_connection(req, traces, timeout)
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection
        raise last_exc
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
        transp, proto = await self._wrap_create_connection(
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
        raise client_error(req.connection_key, exc) from exc
    aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.telegram.org:443 ssl:default [Network is unreachable]
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/Dex9er/TELEGRAM2/main.py", line 447, in <module>
        executor.start_polling(dp)
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiogram/utils/executor.py", line 45, in start_polling
        executor.start_polling(
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiogram/utils/executor.py", line 320, in start_polling
        loop.run_until_complete(self._startup_polling())
      File "/usr/local/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
        return future.result()
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiogram/utils/executor.py", line 372, in _startup_polling
        await self._welcome()
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiogram/utils/executor.py", line 361, in _welcome
        user = await self.dispatcher.bot.me
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiogram/bot/bot.py", line 30, in me
        setattr(self, '_me', await self.get_me())
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiogram/bot/bot.py", line 228, in get_me
        result = await self.request(api.Methods.GET_ME, payload)
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiogram/bot/base.py", line 231, in request
        return await api.make_request(await self.get_session(), self.server, self.__token, method, data, files,
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiogram/bot/api.py", line 142, in make_request
        raise exceptions.NetworkError(f"aiohttp client throws an error: {e.__class__.__name__}: {e}")
    aiogram.utils.exceptions.NetworkError: Aiohttp client throws an error: ClientConnectorError: Cannot connect to host api.telegram.org:443 ssl:default [Network is unreachable]
  • Как исправить ошибки с библиотеками телеграм бота?

    @Dex9er Автор вопроса
    Vindicar, некоторые библиотеки не устанавливаются
    Defaulting to user installation because normal site-packages is not writeable
    Looking in links: /usr/share/pip-wheels
    ERROR: Could not find a version that satisfies the requirement exceptions (from versions: none)
    ERROR: No matching distribution found for exceptions

    я так понимаю что это библиотеки все равно не сущевствует
  • Как исправить ошибки с библиотеками телеграм бота?

    @Dex9er Автор вопроса
    Vindicar, да я перепроверил, и не установил одну библиотеку. Только теперь выводит другие ошибки
    Traceback (most recent call last):
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiohttp/connector.py", line 986, in _wrap_create_connection
        return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
      File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1056, in create_connection
        raise exceptions[0]
      File "/usr/local/lib/python3.9/asyncio/base_events.py", line 1041, in create_connection
        sock = await self._connect_sock(
      File "/usr/local/lib/python3.9/asyncio/base_events.py", line 955, in _connect_sock
        await self.sock_connect(sock, address)
      File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 502, in sock_connect
        return await fut
      File "/usr/local/lib/python3.9/asyncio/selector_events.py", line 507, in _sock_connect
        sock.connect(address)
    OSError: [Errno 101] Network is unreachable
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiogram/bot/api.py", line 139, in make_request
        async with session.post(url, data=req, **kwargs) as response:
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiohttp/client.py", line 1138, in __aenter__
        self._resp = await self._coro
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiohttp/client.py", line 535, in _request
        conn = await self._connector.connect(
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiohttp/connector.py", line 542, in connect
        proto = await self._create_connection(req, traces, timeout)
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiohttp/connector.py", line 907, in _create_connection
        _, proto = await self._create_direct_connection(req, traces, timeout)
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiohttp/connector.py", line 1206, in _create_direct_connection
        raise last_exc
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiohttp/connector.py", line 1175, in _create_direct_connection
        transp, proto = await self._wrap_create_connection(
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiohttp/connector.py", line 992, in _wrap_create_connection
        raise client_error(req.connection_key, exc) from exc
    aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host api.telegram.org:443 ssl:default [Network is unreachable]
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/home/Dex9er/TELEGRAM2/main.py", line 447, in <module>
        executor.start_polling(dp)
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiogram/utils/executor.py", line 45, in start_polling
        executor.start_polling(
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiogram/utils/executor.py", line 320, in start_polling
        loop.run_until_complete(self._startup_polling())
      File "/usr/local/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
        return future.result()
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiogram/utils/executor.py", line 372, in _startup_polling
        await self._welcome()
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiogram/utils/executor.py", line 361, in _welcome
        user = await self.dispatcher.bot.me
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiogram/bot/bot.py", line 30, in me
        setattr(self, '_me', await self.get_me())
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiogram/bot/bot.py", line 228, in get_me
        result = await self.request(api.Methods.GET_ME, payload)
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiogram/bot/base.py", line 231, in request
        return await api.make_request(await self.get_session(), self.server, self.__token, method, data, files,
      File "/home/Dex9er/.local/lib/python3.9/site-packages/aiogram/bot/api.py", line 142, in make_request
        raise exceptions.NetworkError(f"aiohttp client throws an error: {e.__class__.__name__}: {e}")
    aiogram.utils.exceptions.NetworkError: Aiohttp client throws an error: ClientConnectorError: Cannot connect to host api.telegram.org:443 ssl:default [Network is unreachable]