run-llama/llama_index · error · DeprecationWarning
JSONalyzeQueryEngine has been moved to `llama-index-experime
Error message
JSONalyzeQueryEngine has been moved to `llama-index-experimental`. `pip install llama-index-experimental` `from llama_index.experimental.query_engine import JSONalyzeQueryEngine` Note that the JSONalyzeQueryEngine allows for arbitrary file creation, and should be used in a secure environment.
What it means
llama-index-core ships JSONalyzeQueryEngine only as a tombstone: constructing it raises DeprecationWarning as an exception, telling you the real implementation moved to the llama-index-experimental package (JSONalyze over pandas). The note about arbitrary file creation is a security warning — the engine materializes temp files, so run it in trusted environments.
Source
Thrown at llama-index-core/llama_index/core/query_engine/jsonalyze/jsonalyze_query_engine.py:24
This tool is not recommended to be used in a production setting, and would
require heavy sandboxing or virtual machines.
DEPRECATED: Use `JSONalyzeQueryEngine` from `llama-index-experimental` instead.
"""
from typing import Any
class JSONalyzeQueryEngine:
"""
JSONalyze query engine.
DEPRECATED: Use `JSONalyzeQueryEngine` from `llama-index-experimental` instead.
"""
def __init__(self, *args: Any, **kwargs: Any) -> None:
raise DeprecationWarning(
"JSONalyzeQueryEngine has been moved to `llama-index-experimental`.\n"
"`pip install llama-index-experimental`\n"
"`from llama_index.experimental.query_engine import JSONalyzeQueryEngine`\n"
"Note that the JSONalyzeQueryEngine allows for arbitrary file creation, \n"
"and should be used in a secure environment."
)
View on GitHub (pinned to afd0fef371)
Solutions
- pip install llama-index-experimental and switch the import to `from llama_index.experimental.query_engine import JSONalyzeQueryEngine`.
- Update all call sites that import from llama_index.core.query_engine.jsonalyze.* (grep for 'jsonalyze').
- Run it only where the working directory/file system is trusted — it writes temporary JSON files.
- If you cannot install experimental packages, implement a small pandas-analysis engine yourself with CustomQueryEngine + a pandas output parser.
Example fix
# before
from llama_index.core.query_engine.jsonalyze.jsonalyze_query_engine import (
JSONalyzeQueryEngine,
)
engine = JSONalyzeQueryEngine(df=df) # raises DeprecationWarning
# after
# pip install llama-index-experimental
from llama_index.experimental.query_engine import JSONalyzeQueryEngine
engine = JSONalyzeQueryEngine(df=df) Defensive patterns
Strategy: fallback
Validate before calling
try:
from llama_index.experimental.query_engine import JSONalyzeQueryEngine # noqa
HAS_EXPERIMENTAL = True
except ImportError:
HAS_EXPERIMENTAL = False
if not HAS_EXPERIMENTAL:
raise SystemExit("pip install llama-index-experimental to use JSONalyzeQueryEngine") Try / catch
try:
engine = JSONalyzeQueryEngine(df=df)
except DeprecationWarning as e:
# tombstone stub from llama-index-core — switch to the experimental package
from llama_index.experimental.query_engine import JSONalyzeQueryEngine as ExpEngine
engine = ExpEngine(df=df) Prevention
- Install llama-index-experimental alongside llama-index-core if you use jsonalyze/pandas engines.
- Grep for 'core.query_engine.jsonalyze' imports after every llama-index upgrade.
- Run the engine only in trusted environments — it creates files on disk.
When it happens
Trigger: Calling JSONalyzeQueryEngine(...) (any arguments) after upgrading llama-index-core past the removal: the __init__ unconditionally raises. Reproduces with even `JSONalyzeQueryEngine(df=df, ...)` — no argument set avoids it.
Common situations: Upgrading llama-index-core to a version where the module was gutted, while old code or tutorials still import from llama_index.core.query_engine.jsonalyze. The class remains importable, so the failure moves from import time to construction time.
Related errors
- PandasInstructionParser has been moved to `llama-index-exper
- PandasQueryEngine has been moved to `llama-index-experimenta
- This class is deprecated. Use any LLM class directly.
- code_execute_fn must be provided for CodeActAgent
- ChatMessage contains multiple blocks, use 'ChatMessage.block
AI-assisted analysis of run-llama/llama_index@afd0fef371 (2026-08-15).
Data as JSON: /api/errors/d5ef625f877e2d91.
Report an issue: GitHub.