Tencent/WeKnora · error
file is not an executable script: %s
Error message
file is not an executable script: %s
What it means
For preloaded (non-image) skills, after successfully loading the file the manager checks SkillFile.IsScript; a file that exists but is not an executable script (wrong extension, e.g. .md, .txt, .json) is rejected. The interpreter/executor can only be chosen for recognized script extensions.
Source
Thrown at internal/agent/skills/manager.go:452
skillName, scriptPath, basePath string,
args []string,
stdin string,
env map[string]string,
sessionID string,
) (*sandbox.ExecuteConfig, error) {
if workspace, ok := sandbox.RunnableWorkspaceScript(scriptPath); ok {
return workspaceSkillExecuteConfig(source, skillName, workspace, basePath, args, stdin, env, sessionID)
}
image, installed := source.(imageSkillSource)
if !installed {
// Load the script file to verify it exists and is a script
file, err := source.LoadSkillFile(skillName, scriptPath)
if err != nil {
return nil, fmt.Errorf("failed to load script: %w", err)
}
if !file.IsScript {
return nil, fmt.Errorf("file is not an executable script: %s", scriptPath)
}
return &sandbox.ExecuteConfig{
Script: file.Path,
Args: args,
WorkDir: basePath,
Stdin: stdin,
Env: env,
SessionID: sessionID,
}, nil
}
// The archive is deliberately not consulted: the image is what executes,
// and a skill whose archive failed to store is still installed and
// runnable. That leaves the extension as the only check available here,
// which is also the one the executor's interpreter choice depends on.
if !IsScript(scriptPath) {
return nil, fmt.Errorf("file is not an executable script: %s", scriptPath)
}View on GitHub (pinned to 988cbb0330)
Solutions
- Pass a path to a file with a supported executable extension (.py, .sh, etc.)
- Use the file-reading tool for documentation/data files instead of execute_skill_script
- Rename/convert the file to a supported script type inside the skill, or add the extension if it was stripped
- Check IsScript/extension rules in the skills package to confirm supported types
Example fix
// before mgr.ExecuteScript(ctx, "pdf", "docs/README.md", nil, "") // after mgr.ExecuteScript(ctx, "pdf", "scripts/extract.py", nil, "")
Defensive patterns
Strategy: validation
Validate before calling
if !skills.IsScript(scriptPath) {
return fmt.Errorf("refusing to execute non-script %s", scriptPath)
} Type guard
func isExecutableScript(path string) bool { return skills.IsScript(path) } Try / catch
_, err := mgr.ExecuteScript(ctx, skill, path, args, stdin)
if err != nil && strings.Contains(err.Error(), "file is not an executable script") {
// read the file with the file tool instead of executing
}
return err Prevention
- Only pass paths with supported script extensions to execute_skill_script
- Use the file-reading tool for docs/data inside skills
- Check skills.IsScript before calling ExecuteScript programmatically
- Keep scripts with standard extensions (.py, .sh) in skill packages
When it happens
Trigger: Manager.ExecuteScript on a preloaded skill with a skill-relative path that resolves to a data/doc file rather than a .py/.sh/etc. script — e.g. passing 'README.md' or a config JSON as scriptPath.
Common situations: The model or caller points execute_skill_script at a documentation or data file inside the skill; skill author shipped a script with an unsupported extension; confusion between reading a file (load_skill_file) and executing it.
Related errors
- model ID cannot be empty
- unknown credential field:
- member_limit must be >= 0
- cannot request upgrade to same or lower role
- E2B timeout must be at least one second
AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02).
Data as JSON: /api/errors/e6a69ca67ccefa84.
Report an issue: GitHub.