Skip to content

Payment issues, raising errors in the example bot #1354

@inchw0rm

Description

@inchw0rm

Hi, I'm not sure if this is a duplicate, but I decided to open a new one.

Steps to reproduce

  1. Get necessary tokens, set up test payment methods (I used stripe test)

  2. Start the payment example bot

  3. Execute the /shipping command in telegram, in the dialog with the bot

Expected behaviour

The bot should accept the shipment details put in by the user.

Actual behaviour

The bot throws an exception, and doesn't handle the data in the user input in any way.

Configuration

Operating System:
Arch linux

Version of Python, python-telegram-bot & dependencies:
python-telegram-bot 12.0.0b1 (cloned from master commit 26ce9bb)
certifi 2018.11.29
future 0.17.1
Python 3.7.2 (default, Jan 10 2019, 23:51:51) [GCC 8.2.1 20181127]

Logs

2019-02-22 23:26:34,092 - telegram.ext.dispatcher - ERROR - An uncaught error was raised while processing the update Traceback (most recent call last): File "/home/inchw0rm/proj/weedybot/lib/python3.7/site-packages/telegram/ext/dispatcher.py", line 333, in process_update handler.handle_update(update, self, check, context) File "/home/inchw0rm/proj/weedybot/lib/python3.7/site-packages/telegram/ext/handler.py", line 117, in handle_update return self.callback(update, context) File "test.py", line 96, in shipping_callback query.answer(ok=True, shipping_options=options) File "/home/inchw0rm/proj/weedybot/lib/python3.7/site-packages/telegram/payment/shippingquery.py", line 86, in answer return self.bot.answer_shipping_query(self.id, *args, **kwargs) AttributeError: 'NoneType' object has no attribute 'answer_shipping_query'

For better readability I've created a gist with the error message here

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions