Telegram 属性错误:';标签图案';对象没有属性';遵守';
我想为我的电报bot(Telegram 属性错误:';标签图案';对象没有属性';遵守';,telegram,telegram-bot,python-telegram-bot,Telegram,Telegram Bot,Python Telegram Bot,我想为我的电报bot(pyTelegramBotAPI)添加付款。 但当我使用-时,它给出了一个例外: AttributeError:“LabeledPrice”对象没有属性“to_dict” 有人能帮我吗 shipping_options = [ ShippingOption(id='instant', title='WorldWide Teleporter').add_price(LabeledPrice('Teleporter', 1000)) ] @bot.shipping_
pyTelegramBotAPI
)添加付款。
但当我使用-时,它给出了一个例外:AttributeError:“LabeledPrice”对象没有属性“to_dict”
有人能帮我吗
shipping_options = [
ShippingOption(id='instant', title='WorldWide Teleporter').add_price(LabeledPrice('Teleporter', 1000))
]
@bot.shipping_query_handler(func=lambda query: True)
def shipping(shipping_query):
print(shipping_query)
bot.answer_shipping_query(
shipping_query.id,
ok=True,
shipping_options=shipping_options,
error_message='Oh, seems like our Dog couriers are having a lunch right now. Try again later!'
)
我刚刚用
python电报bot
13.5版遇到了这个问题,而降级到13.4.1版暂时解决了这个问题(通过pip3安装'python电报bot==13.4.1'
)
发生在Ubuntu 20.04和Python 3.8.5上