JanDeDobbeleer/oh-my-posh · info
no data found
Error message
no data found
What it means
The lastfm segment queries the Last.fm API for the user's recent tracks. setStatus() calls getResult() and, if the response contains zero tracks (TracksInfo.Tracks empty), returns 'no data found' — meaning the account has no scrobbled/recent track data for the query period.
Source
Thrown at src/segments/lastfm.go:97
return new(lfmDataResponse), err
}
err = json.Unmarshal(body, &response)
if err != nil {
return new(lfmDataResponse), err
}
return response, nil
}
func (d *LastFM) setStatus() error {
q, err := d.getResult()
if err != nil {
return err
}
if len(q.TracksInfo.Tracks) == 0 {
return errors.New("no data found")
}
track := q.TracksInfo.Tracks[0]
d.Artist = track.Artist.Name
d.Track = track.Name
d.Full = fmt.Sprintf("%s - %s", d.Artist, d.Track)
isPlaying := track.Info != nil && track.Info.IsPlaying != nil && *track.Info.IsPlaying == "true"
if isPlaying {
d.Icon = d.options.String(PlayingIcon, "\uE602 ")
d.Status = "playing"
} else {
d.Icon = d.options.String(StoppedIcon, "\uF04D ")
d.Status = "stopped"
}
View on GitHub (pinned to 0976794618)
Solutions
- Play and scrobble some music, then let the prompt re-render.
- Verify your player is actually scrobbling to Last.fm (check the recent tracks page on last.fm).
- Confirm the api_key and user options point to the correct Last.fm account.
- Disable the segment until the account has track data.
Defensive patterns
Strategy: fallback
Validate before calling
// check recent tracks before enabling: curl "https://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=<user>&api_key=<key>&format=json&limit=1"
Prevention
- Confirm the Last.fm account has recent scrobbles before enabling the segment.
- Verify the player's scrobbling connection is active.
- Check the user option matches the scrobbling account.
When it happens
Trigger: Enabled() runs, the API call succeeds, but the returned recent-tracks list is empty: account with no scrobbles, no tracks played recently, or a freshly created API account.
Common situations: User hasn't listened to music since enabling scrobbling; scrobbling is paused/disconnected in the player; Last.fm profile is new; private profile hiding data.
Related errors
- no game score found for team
- no scheduled game found for team
- no scheduled game found for team within DaysOffset days
- no elements in the array
- no data found
AI-assisted analysis of JanDeDobbeleer/oh-my-posh@0976794618 (2026-08-31).
Data as JSON: /api/errors/38f17c6eb244e779.
Report an issue: GitHub.