{"record":{"id":"21e7f2eaf48458f7","repo":"glanceapp/glance","slug":"no-places-found-for-s","errorCode":null,"errorMessage":"no places found for %s","messagePattern":"no places found for (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"internal/glance/widget-weather.go","lineNumber":181,"sourceCode":"\n\tif len(parts) == 2 {\n\t\treturn parts[0] + \", \" + expandCountryAbbreviations(parts[1]), \"\"\n\t}\n\n\treturn parts[0] + \", \" + expandCountryAbbreviations(parts[2]), strings.TrimSpace(parts[1])\n}\n\nfunc fetchOpenMeteoPlaceFromName(location string) (*openMeteoPlaceResponseJson, error) {\n\tlocation, area := parsePlaceName(location)\n\trequestUrl := fmt.Sprintf(\"https://geocoding-api.open-meteo.com/v1/search?name=%s&count=20&language=en&format=json\", url.QueryEscape(location))\n\trequest, _ := http.NewRequest(\"GET\", requestUrl, nil)\n\tresponseJson, err := decodeJsonFromRequest[openMeteoPlacesResponseJson](defaultHTTPClient, request)\n\tif err != nil {\n\t\treturn nil, fmt.Errorf(\"fetching places data: %v\", err)\n\t}\n\n\tif len(responseJson.Results) == 0 {\n\t\treturn nil, fmt.Errorf(\"no places found for %s\", location)\n\t}\n\n\tvar place *openMeteoPlaceResponseJson\n\n\tif area != \"\" {\n\t\tarea = strings.ToLower(area)\n\n\t\tfor i := range responseJson.Results {\n\t\t\tif strings.ToLower(responseJson.Results[i].Area) == area {\n\t\t\t\tplace = &responseJson.Results[i]\n\t\t\t\tbreak\n\t\t\t}\n\t\t}\n\n\t\tif place == nil {\n\t\t\treturn nil, fmt.Errorf(\"no place found for %s in %s\", location, area)\n\t\t}\n\t} else {","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/glanceapp/glance/blob/91324e8de762702e97b0ac5c8e36271d644d8642/internal/glance/widget-weather.go#L163-L199","documentation":"The Open-Meteo geocoding API responded successfully but contained zero results for the location string. The name (after parsePlaceName stripped any area qualifier) does not match any known place in Open-Meteo's geocoder.","triggerScenarios":"A misspelled or nonexistent location name; an overly specific free-form string ('home'); a name that exists locally but not in Open-Meteo's database; area-qualified strings where the base name is wrong.","commonSituations":"Typos like 'Amsterdaam'; fictional or very small place names; users assuming a colloquial area name will resolve.","solutions":["Test the name directly: curl 'https://geocoding-api.open-meteo.com/v1/search?name=YOURNAME&count=20&language=en&format=json' — if results is empty, the name is the problem","Use the canonical English spelling or the 'City, Country' form","For ambiguous names, use the 'City, Area' form (e.g. 'Portland, Oregon') so the area filter can disambiguate"],"exampleFix":"# before\nlocation: Amsterdaam\n\n# after\nlocation: Amsterdam, Netherlands","handlingStrategy":"validation","validationCode":"// Pre-flight a location string against the same geocoder the widget uses\nfunc locationResolves(name string) bool {\n    u := fmt.Sprintf(\"https://geocoding-api.open-meteo.com/v1/search?name=%s&count=1&format=json\", url.QueryEscape(name))\n    resp, err := http.Get(u)\n    if err != nil { return false }\n    defer resp.Body.Close()\n    var r struct{ Results []struct{} `json:\"results\"` }\n    _ = json.NewDecoder(resp.Body).Decode(&r)\n    return len(r.Results) > 0\n}","typeGuard":"func isNoPlacesFound(err error) bool {\n\treturn err != nil && strings.HasPrefix(err.Error(), \"no places found for\")\n}","tryCatchPattern":"place, err := fetchOpenMeteoPlaceFromName(cfg.Location)\nif isNoPlacesFound(err) {\n    // authoring error: surface to the user instead of retrying\n    return fmt.Errorf(\"bad location %q in config: %w\", cfg.Location, err)\n}","preventionTips":["Test new locations against the geocoding API before committing them to config","Prefer 'City, Country' spelling as it appears in Open-Meteo results"],"tags":["weather","geocoding","config","open-meteo"],"backgroundTag":null,"analyzedSha":"91324e8de762702e97b0ac5c8e36271d644d8642","analyzedAt":"2026-08-15T14:12:54.279Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}