aiogram.utils.exceptions.NetworkError: Aiohttp客户端抛出错误: ClientConnectorError:无法连接到主机api.telegram.org:443 ssl:默认的信号量超时超过了,我在运行电报bot的代码时出现了此错误。然后,我又安装了aiohttp。它已经消失了。但这是另一个问题。当我运行电报bot的代码时,bot无法工作。他不听我的命令,但控制台没有错误。没有错误-但是机器人不工作。
有人能帮我解决这个问题吗?我很感谢你的建议和建议。Python-3.8v
代码:
from aiogram import Bot, types
from aiogram.dispatcher import Dispatcher
from aiogram.utils import executor
import time
from time import sleep
import selenium
from selenium import webdriver
import asyncio
bot = Bot('token')
dp = Dispatcher(bot)
@dp.message_handler(commands=['start'])
async def start_message(message):
await bot.send_message(message.chat.id, 'some text')发布于 2022-03-14 20:27:36
首先,使用如下命令在终端中运行python <program>
python test1.py在终端机你收到消息
INFO:aiogram.dispatcher.dispatcher:Start polling....第二,你需要去电报应用,你的机器人聊天。并编写组件,比如/start。
https://stackoverflow.com/questions/66832285
复制相似问题