python-telegram-bot/python-telegram-bot · warning · Warning
Ignoring `conversation_timeout` because the Applications Job
Error message
Ignoring `conversation_timeout` because the Applications JobQueue is not running.
What it means
This warning is emitted by ConversationHandler when a `conversation_timeout` is configured but the Application's JobQueue scheduler is not running, so no timeout job can be scheduled. The timeout feature relies on JobQueue to fire the TIMEOUT state after inactivity. Without a running scheduler the timeout is silently ignored and conversations never time out.
Source
Thrown at src/telegram/ext/_handlers/conversationhandler.py:863
new_state = application.create_task(
coroutine=handler.handle_update(
update, application, handler_check_result, context
),
update=update,
name=f"ConversationHandler:{update.update_id}:handle_update:non_blocking_cb",
)
except ApplicationHandlerStop as exception:
new_state = exception.state
raise_dp_handler_stop = True
async with self._timeout_jobs_lock:
if self.conversation_timeout:
if application.job_queue is None:
warn(
"Ignoring `conversation_timeout` because the Application has no JobQueue.",
stacklevel=1,
)
elif not application.job_queue.scheduler.running:
warn(
"Ignoring `conversation_timeout` because the Applications JobQueue is "
"not running.",
stacklevel=1,
)
elif isinstance(new_state, asyncio.Task):
# Add the new timeout job
# checking if the new state is self.END is done in _schedule_job
application.create_task(
self._schedule_job_delayed(
new_state, application, update, context, conversation_key
),
update=update,
name=f"ConversationHandler:{update.update_id}:handle_update:timeout_job",
)
else:
self._schedule_job(new_state, application, update, context, conversation_key)
if isinstance(self.map_to_parent, dict) and new_state in self.map_to_parent:View on GitHub (pinned to d3b69d2e9f)
Solutions
- Ensure the bot is run via application.run_polling() or application.run_webhook() so the JobQueue scheduler is started
- If managing the lifecycle manually, call await application.start() (which starts the JobQueue) before updates are processed
- If using a custom JobQueue, start its scheduler before the application handles updates, e.g. await application.job_queue.scheduler.start()
- Install the optional extra pip install 'python-telegram-bot[job-queue]' if job_queue is None (the sibling warning)
Example fix
# before app = Application.builder().token(TOKEN).build() # manually: scheduler never started await app.initialize() await app.updater.start_polling() # after app = Application.builder().token(TOKEN).build() await app.initialize() await app.start() # starts the JobQueue scheduler await app.updater.start_polling()
Defensive patterns
Strategy: validation
Validate before calling
def job_queue_ready(application) -> bool:
jq = application.job_queue
return jq is not None and jq.scheduler.running
# before handling updates:
if conv_timeout_used and not job_queue_ready(app):
logging.warning("conversation_timeout will be ignored: start the application first") Prevention
- Always start apps via run_polling()/run_webhook() so the JobQueue scheduler starts with it
- In tests, use ApplicationBuilder().job_queue(None) builds or start the scheduler before asserting timeout behavior
- Install the job-queue extra if you use conversation_timeout or JobQueue features
When it happens
Trigger: Building an Application with `ConversationHandler(conversation_timeout=...)` while either (a) no JobQueue is installed (application.job_queue is None — the adjacent branch warns about that), or (b) a JobQueue exists but its APScheduler `scheduler.running` is False, e.g. the application was not started via `application.run_polling()`/`run_webhook()`, or a custom JobQueue was set with `Application.builder().job_queue(custom)` and never started, or `application.initialize()` was called without `start()`.
Common situations: Running the bot manually with initialize/start of only the updater (skipping application.start()), testing with pytest and ApplicationBuilder without a running job queue, installing `python-telegram-bot[job-queue]` missing so job_queue is None (nearby warning), or providing a custom JobQueue whose scheduler isn't started in async/PTB v20+ migrations.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- Ignoring `conversation_timeout` because the Application has
- ApplicationHandlerStop in TIMEOUT state of ConversationHandl
- No `JobQueue` set up. To use `JobQueue`, you must install PT
- No `JobQueue` set up. To use `JobQueue`, you must install PT
- {repr(handler.callback.__name__) if handler is not None else
AI-assisted analysis of python-telegram-bot/python-telegram-bot@d3b69d2e9f (2026-08-28).
Data as JSON: /api/errors/7faf00de193f804a.
Report an issue: GitHub.