Skip to content

fix(odds-ticker): stop the glibc-only date format crashing the ticker - #415

Open
ChuckBuilds wants to merge 1 commit into
mainfrom
docs/odds-ticker-readme
Open

fix(odds-ticker): stop the glibc-only date format crashing the ticker#415
ChuckBuilds wants to merge 1 commit into
mainfrom
docs/odds-ticker-readme

Conversation

@ChuckBuilds

Copy link
Copy Markdown
Owner

The crash

_create_game_display formatted the kick-off date as:

date_text = local_time.strftime("%-m/%d")

%-m is a glibc extension. On Windows and on musl, strftime raises:

ValueError: Invalid format string

The exception escapes the per-game render, so it is not one bad card — the whole ticker falls back to "No odds data". That is exactly what I hit trying to render this plugin's screenshots, and it is why the plugin cannot be worked on off a Pi.

It now builds the same 9/13 text portably; output is byte-identical on glibc.

Ten other plugins call %-m, %-d or %-I — mostly inside the copied sports.py lineage, where CLAUDE.md requires a fix to be ported across all siblings in one PR. That is a deliberate separate sweep, filed as #414. I fixed only the two in this plugin's own files, because without them there is nothing to screenshot.

Bitmap fonts

Same pattern as #388 and #394: a .bdf exists at exactly one pixel size, and the loader caught FreeType's refusal and quietly substituted PressStart2P — so the font menu appeared to work while ignoring the choice. It now retries at the face's declared PIXEL_SIZE.

cozette.bdf is dropped from all three font menus; the core ships no file of that name (#387).

The configuration section described paths that are rejected

It documented 8 settings as top-level keys:

display_duration, scroll_speed, scroll_delay, show_favorite_teams_only,
games_per_favorite_team, max_games_per_league, show_odds_only, future_fetch_days

Every one is nested — under display_options, filtering or data_settings. The schema sets additionalProperties: false, so a config written the way the README described is rejected, not merely ignored.

Two of the eight also had the wrong default: scroll_speed is 1.0 (not 2) and scroll_delay is 0.02 (not 0.05).

All 47 settings are now documented at their real paths, including the broadcast-logo ratios, the duration block and every per-league entry. I checked each against both the plugin and the core: nothing here is dead — every setting is read somewhere.

Images

A game card, show_channel_logos on and off, and four panel sizes. Games are seeded onto the plugin; last_update has to be seeded too, or display() re-fetches and clears them — that is recorded in the shots file.

Team records read (N/A) in these renders: they come from a live per-team ESPN lookup during update(), which the renders skip. The caption says so rather than implying the field is broken.

Checks

  • check_plugin.py: 8/8 pass
  • render_docs_assets.py --check: all three images reproduce
  • config-token audit: nothing dropped

1.3.3 → 1.4.0.

🤖 Generated with Claude Code

_create_game_display formatted the kick-off date with strftime("%-m/%d").
%-m is a glibc extension: on Windows and on musl it raises ValueError:
Invalid format string. The exception escaped the per-game render, so the whole
ticker fell back to "No odds data" rather than one card failing.

It now builds the same "9/13" text portably. Identical output on glibc, and
the plugin can be rendered off a Pi. Ten other plugins call %-m, %-d or %-I --
mostly inside the copied sports.py lineage, so a sweep there belongs in its own
PR: filed as #414.

Bitmap fonts: a .bdf exists at exactly one pixel size, and the loader caught
FreeType's refusal and silently substituted PressStart2P. It now retries at the
face's declared PIXEL_SIZE. cozette.bdf is dropped from the three font menus
because the core ships no file of that name (#387). Also removes a duplicate
import pytz that pyflakes flagged.

README: the configuration section documented 8 settings as top-level keys --
display_duration, scroll_speed, scroll_delay, show_favorite_teams_only,
games_per_favorite_team, max_games_per_league, show_odds_only,
future_fetch_days. Every one of them is nested under display_options,
filtering or data_settings, and the schema sets additionalProperties: false,
so a config written the way the README described is rejected rather than
ignored. Two of the eight also gave the wrong default: scroll_speed is 1.0 not
2, and scroll_delay is 0.02 not 0.05.

All 47 settings are now documented at their real paths, including the four
broadcast-logo and duration settings and the per-league blocks. Nothing in
this plugin is dead -- every setting is read by the plugin or the core.

check_plugin.py: 8/8 pass.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 3, 2026

Copy link
Copy Markdown
Contributor

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 9f0055fe-f601-4011-8889-16be8dd71485


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 8 complexity

Metric Results
Complexity 8

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant