sipeed/picoclaw · error
migrateV2ToV3: expected version 2, got %v
Error message
migrateV2ToV3: expected version 2, got %v
What it means
Error "migrateV2ToV3: expected version 2, got %v" thrown in sipeed/picoclaw.
Source
Thrown at pkg/config/migration.go:349
}
}
} else {
logger.Warnf("model_list is not a slice: %#v", m["model_list"])
}
m["version"] = 2
return nil
}
// migrateV2ToV3 converts a V2 config JSON to V3 format:
// 1. Renames "channels" key to "channel_list"
// 2. Converts flat-format channel entries to nested format (wrapping
// channel-specific fields in "settings")
// 3. Sets version to 3
func migrateV2ToV3(m map[string]any) error {
if !compareInt(m["version"], 2) {
return fmt.Errorf("migrateV2ToV3: expected version 2, got %v", m["version"])
}
migrateLegacyAgentDefaultsModel(m)
delete(m, "bindings")
// Rename channels → channel_list
if channels, ok := m["channels"]; ok {
delete(m, "channels")
// Convert each channel from flat to nested format
if chMap, ok := channels.(map[string]any); ok {
for k, ch := range chMap {
if chVal, ok := ch.(map[string]any); ok {
chVal["type"] = k
// If already has "settings" key, leave as-is
if _, hasSettings := chVal["settings"]; hasSettings {
continue
}View on GitHub (pinned to 49183d7e8d)
When it happens
Trigger: Thrown at pkg/config/migration.go:349 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/d44b1cbf5fecd60a.
Report an issue: GitHub.