iflytek/astron-agent · error · CustomException
21600
21600
Error message
Unsupported E2B code language: {language} What it means
_require_sandbox_config validates the language argument of the E2B executor before sandbox creation; only 'python' is supported. Any other language raises CustomException code 21600 (CODE_EXECUTION_ERROR) with the unsupported language name.
Solutions
- Set the code node's language to exactly 'python' when using the E2B executor.
- If JS execution is required, choose an executor branch that supports it or extend _require_sandbox_config with explicit support for additional E2B languages.
- Normalize language strings at node-configuration load time (lowercase, canonical aliases) to avoid 'python3'/'Python' variants.
Example fix
// before
await executor.execute("javascript", code, config)
// after
await executor.execute("python", code, config) Defensive patterns
Strategy: type-guard
Validate before calling
LANGS = {"python"}
assert language in LANGS, f"E2B executor supports {sorted(LANGS)} only, got {language!r}" Type guard
def is_supported_language(lang: object) -> bool:
return isinstance(lang, str) and lang == "python" Try / catch
try:
out = ex.execute(language, code, cfg)
except CustomException as e:
if e.err_code == 21600 and "language" in e.err_msg: route to a language-capable executor or reject the node run Prevention
- Restrict the node UI language options to what the selected executor supports
- Normalize language names to canonical lowercase values at config load
- Add per-executor capability metadata checked before execution
When it happens
Trigger: Calling execute() on the E2B executor with language values like 'javascript', 'js', 'python3', 'PY', or a node misconfigured to a non-Python language.
Common situations: Workflow node language dropdown set to JS while executor backend is E2B (which this build restricts to Python); case mismatch like 'Python'.
Related errors
AI-assisted analysis of iflytek/astron-agent@5e758547a8 (2026-09-12).
Data as JSON: /api/errors/b91fb6f35765f99b.
Report an issue: GitHub.
Appendix: source
Thrown at core/workflow/engine/nodes/code/executor/e2b/e2b_executor.py:452
MAX_SANDBOX_COMMAND_OUTPUT_BYTES,
min(max(timeout_seconds, 1), 60),
)
return (
int(getattr(result, "exit_code", 0) or 0),
_decode_bounded_output(stdout_bytes, stdout_truncated),
_decode_bounded_output(stderr_bytes, stderr_truncated),
)
finally:
for output_path in (stdout_path, stderr_path):
try:
await sandbox.files.remove(output_path, user="root")
except Exception:
pass
def _require_sandbox_config(language: str, value: Any) -> dict[str, Any]:
if language != "python":
raise CustomException(
err_code=CodeEnum.CODE_EXECUTION_ERROR,
err_msg=f"Unsupported E2B code language: {language}",
)
if not isinstance(value, dict):
raise CustomException(
err_code=CodeEnum.CODE_EXECUTION_ERROR,
err_msg=SANDBOX_RUNTIME_CONFIG_ERROR,
)
return value
async def _create_e2b_sandbox(sandbox_config: dict[str, Any]) -> tuple[Any, int]:
from e2b import AsyncSandbox
try:
api_key, execution_timeout, allow_internet_access = (
await _fetch_e2b_runtime_config(sandbox_config)
)View on GitHub (pinned to 5e758547a8)