JanDeDobbeleer/oh-my-posh · info

no scheduled game found for team within DaysOffset days

Error message

no scheduled game found for team within DaysOffset days

What it means

Raised by retrieveScheduleData after exhausting the days_offset search window (default 8 days) without finding any scheduled game for the team. It first tries the live scoreboard, and only when that has no game does it walk day-by-day through the schedule endpoint; this error means no game for the team exists in that entire window.

Source

Thrown at src/segments/nba.go:260

		}

		return &NBAData{
			AwayTeam:       gameInfo.VtAbbreviation,
			HomeTeam:       gameInfo.HtAbbreviation,
			Time:           gameInfo.Time + " ET",
			GameDate:       gameInfo.Date,
			StartTimeUTC:   nba.parseTimetoUTC(gameInfo.Time, gameInfo.Date),
			GameStatus:     Scheduled,
			HomeScore:      0,
			AwayScore:      0,
			HomeTeamWins:   0,
			HomeTeamLosses: 0,
			AwayTeamWins:   0,
			AwayTeamLosses: 0,
		}, nil
	}

	return nil, errors.New("no scheduled game found for team within DaysOffset days")
}

// The score endpoint usually goes live within 12 hours of a game starting.
func (nba *Nba) getAvailableGameData(teamName string, httpTimeout int) (*NBAData, error) {
	// Get the info from the score endpoint
	data, err := nba.retrieveScoreData(teamName, httpTimeout)
	if err == nil {
		return data, nil
	}

	// If the score endpoint doesn't have anything get data from the schedule endpoint
	data, err = nba.retrieveScheduleData(teamName, httpTimeout)
	if err == nil {
		return data, nil
	}

	return nil, err
}

View on GitHub (pinned to 0976794618)

Solutions

  1. Increase days_offset (e.g. 30) so the search window covers the next game.
  2. Use the exact uppercase tricode for the team option.
  3. Set season to the current NBA season (default is hardcoded to "2023").
  4. Accept the segment hiding — Enabled() returns false on this error, which is expected behavior when no game is upcoming.
  5. Verify the team actually has an upcoming game within the window.

Example fix

// before
"days_offset": 8
// after
"days_offset": 30
Defensive patterns

Strategy: fallback

Validate before calling

// before rendering, confirm a game exists within the window
const hasUpcoming = await scheduleHasGameWithin(tricode, daysOffset)
if (!hasUpcoming) renderNothing()

Try / catch

try {
  data = await getAvailableGameData(tricode, timeout)
} catch (e) {
  if (String(e.message).startsWith("no scheduled game")) {
    return null // no upcoming game — expected, hide the segment
  }
  throw e
}

Prevention

When it happens

Trigger: The score endpoint returned no game for the tricode (getAvailableGameData falls back to the schedule), and every day from today through today+days_offset lacks a matching vtAbbreviation/htAbbreviation — off-season, long gap between games, or a wrong team tricode.

Common situations: Off-season or All-Star break prompts, team tricode typos, too-small days_offset for teams with sparse upcoming games, or a stale season option causing empty schedule responses.

Related errors


AI-assisted analysis of JanDeDobbeleer/oh-my-posh@0976794618 (2026-08-31). Data as JSON: /api/errors/8363da2960346da6. Report an issue: GitHub.