attributeError:' callbackContext'对象没有属性'消息'

发布于 2025-02-07 06:11:03 字数 503 浏览 2 评论 0原文

启动此脚本时,我会在标题中获取错误消息。我该如何解决? Python 3.7 我没有更新任何模块,它运行得很好。现在,这个错误出现了。
attributeError:'callbackContext'对象没有属性'消息'

这是代码:

def post(bot, update):
    print(url)
    url = update.message.text.replace("/g ","")
    print(url)
    driver.get(url)
    nameele = driver.find_element_by_xpath("//*[@class='sqdOP yWX7d     _8A5w5   ZIAjV ']")

I get the error message in the title when I start this script. How could I solve it? Python 3.7
I haven't updated any modules, it worked perfectly. Now, this error comes out.
AttributeError: 'CallbackContext' object has no attribute 'message'

Here is the code: pastebin

def post(bot, update):
    print(url)
    url = update.message.text.replace("/g ","")
    print(url)
    driver.get(url)
    nameele = driver.find_element_by_xpath("//*[@class='sqdOP yWX7d     _8A5w5   ZIAjV ']")

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

a√萤火虫的光℡ 2025-02-14 06:11:03

您正在使用Deperced语法进行处理程序回调。自v12.0以来,处理程序回调的签名读取def呼叫(更新:telegram.update,context:telegram.ext.callbackcontext):。请参阅 v12 Transition Guide 有关详细信息。

You're using depercated syntax for handler callbacks. Since v12.0, the signature of handler callbacks reads def callback(update: telegram.Update, context: telegram.ext.CallbackContext):. Please see the v12 transition guide for details.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文