fix(odds-ticker): stop the glibc-only date format crashing the ticker - #415
Open
ChuckBuilds wants to merge 1 commit into
Open
fix(odds-ticker): stop the glibc-only date format crashing the ticker#415ChuckBuilds wants to merge 1 commit into
ChuckBuilds wants to merge 1 commit into
Conversation
_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>
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: 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. Comment |
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 8 |
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The crash
_create_game_displayformatted the kick-off date as:%-mis a glibc extension. On Windows and on musl,strftimeraises: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/13text portably; output is byte-identical on glibc.Ten other plugins call
%-m,%-dor%-I— mostly inside the copiedsports.pylineage, 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
.bdfexists 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 declaredPIXEL_SIZE.cozette.bdfis 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:
Every one is nested — under
display_options,filteringordata_settings. The schema setsadditionalProperties: 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_speedis1.0(not 2) andscroll_delayis0.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_logoson and off, and four panel sizes. Games are seeded onto the plugin;last_updatehas to be seeded too, ordisplay()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 duringupdate(), which the renders skip. The caption says so rather than implying the field is broken.Checks
check_plugin.py: 8/8 passrender_docs_assets.py --check: all three images reproduce1.3.3 → 1.4.0.
🤖 Generated with Claude Code