Имеется программа для тг бота(начало ниже):
from aiogram import Bot, Dispatcher, executor, types, filters
from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton
import asyncio
import aioschedule
import random
import pandas as pd
from config import API_TOKEN
from config import FILENAME
from config import bt_names
from config import id_list
from config import nicknames
from config import emoji
excel_data = pd.read_excel(FILENAME, usecols=[0])
data = pd.DataFrame(excel_data)
phrases = data['name'].tolist()
proxy_url = 'http://proxy.server:3128'
bot = Bot(token=API_TOKEN, proxy=proxy_url)
dp = Dispatcher(bot)
urlkb = InlineKeyboardMarkup(row_width=1)
urlButton1 = InlineKeyboardButton(text='ТГ', url='https://t.me/esaulov_lev')
urlButton2 = InlineKeyboardButton(text='ВК', url='https://vk.me/esaulov_lev')
urlkb.add(urlButton1, urlButton2)
При запуске на сервере выходит ошибка:
Goodbye!
Traceback (most recent call last):
File "/home/LevaEsaulov/.local/lib/python3.10/site-packages/aiohttp/connector.py", line 980, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore[return-value] # noqa
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1064, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 1049, in create_connection
sock = await self._connect_sock(
File "/usr/local/lib/python3.10/asyncio/base_events.py", line 960, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 500, in sock_connect
return await fut
File "/usr/local/lib/python3.10/asyncio/selector_events.py", line 505, in _sock_connect
sock.connect(address)
OSError: [Errno 101] Network is unreachable
The above exception was the direct cause of the following exception:
Сначала была ошибка 111. Поиск по документации привел сюда Добавил в программу переменную proxy_url , но вылезла ошибка 101.