sipeed/picoclaw · error
read out dir
Error message
read out dir: %w
What it means
Wrapped os.ReadDir failure at the top of runReport: the --out directory holding the eval_*.json artifacts cannot be listed (missing, not a directory, or unreadable). Nothing about individual result files has been checked yet — the report command cannot even start scanning.
Solutions
- Run the eval command first so --out is populated
- Verify the --out path exists and is a readable directory
- Check for typos in the --out flag value
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at cmd/membench/main.go:278 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/da9ea2a0eb9c2714.
Report an issue: GitHub.
Appendix: source
Thrown at cmd/membench/main.go:278
}
}
allResults := append(tokenResults, llmResults...)
if err := SaveResults(allResults, flagOut); err != nil {
return fmt.Errorf("save results: %w", err)
}
if err := SaveAggregated(allResults, flagOut); err != nil {
return fmt.Errorf("save aggregated: %w", err)
}
PrintComparison(tokenResults, llmResults)
return nil
}
func runReport(cmd *cobra.Command, args []string) error {
entries, err := os.ReadDir(flagOut)
if err != nil {
return fmt.Errorf("read out dir: %w", err)
}
var allResults []EvalResult
for _, entry := range entries {
if !entry.IsDir() && strings.HasPrefix(entry.Name(), "eval_") && strings.HasSuffix(entry.Name(), ".json") {
path := filepath.Join(flagOut, entry.Name())
var r EvalResult
data, err := os.ReadFile(path)
if err != nil {
log.Printf("WARN: read %s: %v", path, err)
continue
}
if err := json.Unmarshal(data, &r); err != nil {
log.Printf("WARN: parse %s: %v", path, err)
continue
}
allResults = append(allResults, r)
}View on GitHub (pinned to 49183d7e8d)