创建Telegram Bot时遇'TeleBot'无'message_handler'属性错误怎么办?
解决TeleBot对象无'message_handler'属性的问题
遇到的错误:
@my_bot.message_handler(content_types="text")
AttributeError: 'TeleBot' object has no attribute 'message_handler'
解决方案:
- 打开编辑器的终端
- 依次执行以下命令:
pip3 uninstall telebot pip3 uninstall PyTelegramBotAPI pip3 install pyTelegramBotAPI pip3 install --upgrade pyTelegramBotAPI
内容的提问来源于stack exchange,提问作者MB Dev
相关产品推荐
相关产品推荐

