{"record":{"id":"866fe42643883a4d","repo":"python-telegram-bot/python-telegram-bot","slug":"updates-handled-by-handler-class-name-on","errorCode":null,"errorMessage":"Updates handled by {handler.__class__.__name__} only have information about the user, so this handler won't ever be triggered if `per_chat=True`.{per_faq_link}","messagePattern":"Updates handled by (.+?) only have information about the user, so this handler won't ever be triggered if `per_chat=True`\\.(.+?)","errorType":"console","errorClass":"Warning","httpStatus":null,"severity":"warning","filePath":"src/telegram/ext/_handlers/conversationhandler.py","lineNumber":399,"sourceCode":"            elif isinstance(handler, PollHandler):\n                warn(\n                    \"PollHandler will never trigger in a conversation since it has no information \"\n                    \"about the chat or the user who voted in it. Do you mean the \"\n                    \"`PollAnswerHandler`?\",\n                    stacklevel=2,\n                )\n\n            elif self.per_chat and (\n                isinstance(\n                    handler,\n                    ShippingQueryHandler\n                    | InlineQueryHandler\n                    | ChosenInlineResultHandler\n                    | PreCheckoutQueryHandler\n                    | PollAnswerHandler,\n                )\n            ):\n                warn(\n                    f\"Updates handled by {handler.__class__.__name__} only have information about \"\n                    \"the user, so this handler won't ever be triggered if `per_chat=True`.\"\n                    f\"{per_faq_link}\",\n                    stacklevel=2,\n                )\n\n            elif self.per_message and not isinstance(handler, CallbackQueryHandler):\n                warn(\n                    \"If 'per_message=True', all entry points, state handlers, and fallbacks\"\n                    \" must be 'CallbackQueryHandler', since no other handlers \"\n                    f\"have a message context.{per_faq_link}\",\n                    stacklevel=2,\n                )\n            elif not self.per_message and isinstance(handler, CallbackQueryHandler):\n                warn(\n                    \"If 'per_message=False', 'CallbackQueryHandler' will not be \"\n                    f\"tracked for every message.{per_faq_link}\",\n                    stacklevel=2,","sourceCodeStart":381,"sourceCodeEnd":417,"githubUrl":"https://github.com/python-telegram-bot/python-telegram-bot/blob/d3b69d2e9fb7af6c796f84516cfda751752c7cb7/src/telegram/ext/_handlers/conversationhandler.py#L381-L417","documentation":"Handlers whose updates only identify a user (InlineQueryHandler, ChosenInlineResultHandler, PreCheckoutQueryHandler, PollAnswerHandler) can never satisfy per_chat=True tracking, so they will never trigger inside such a ConversationHandler.","triggerScenarios":"ConversationHandler(per_chat=True, ...) containing an InlineQueryHandler/ChosenInlineResultHandler/PreCheckoutQueryHandler/PollAnswerHandler.","commonSituations":"Inline-mode or payment conversations configured with per_chat=True out of habit.","solutions":["Set per_chat=False (and rely on per_user/per_message) for user-only update types","Remove those handlers from the conversation and handle them at Application level"],"exampleFix":"# before\nConversationHandler(..., per_chat=True, states={0: [InlineQueryHandler(cb)]})\n\n# after\nConversationHandler(..., per_chat=False, per_user=True, states={0: [InlineQueryHandler(cb)]})","handlingStrategy":"validation","validationCode":"user_only = (InlineQueryHandler, ChosenInlineResultHandler, PreCheckoutQueryHandler, PollAnswerHandler)\nif ch.per_chat and any(isinstance(h, user_only) for h in ch.states.get(0, [])):\n    ch.per_chat = False  # or remove handlers","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Set per_chat=False for inline/payment/poll-answer conversations"],"tags":["telegram","conversationhandler","per-chat","inline-query"],"backgroundTag":"invalid-conversation-config","analyzedSha":"d3b69d2e9fb7af6c796f84516cfda751752c7cb7","analyzedAt":"2026-08-28T16:18:54.805Z","schemaVersion":2},"datasetVersion":"2026-08-28T21:17:43.275Z"}