attributeError:' callbackContext'对象没有属性'消息'
启动此脚本时,我会在标题中获取错误消息。我该如何解决? 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您正在使用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.