mirror of
https://github.com/SeedSigner/seedsigner.git
synced 2026-10-05 15:08:25 +00:00
The screenshot generator fetches the latest release tag at import time via an unauthenticated GitHub API call. GitHub-hosted runners share outbound IPs and the unauthenticated api.github.com limit is 60 req/hr/IP, so the call was intermittently rate-limited (HTTP 403), returned (None, None), and fed None into the mock_version_to_most_recent_release Version mock. That crashed rendering for every locale with "TypeError: 'NoneType' object is not subscriptable" in the OpeningSplash version string (and would likewise hit len(None) on the Version settings screen). Substitute a placeholder version name and timestamp when the fetch can't resolve the latest release, so the "release build" screenshots still render instead of feeding None into the mock. The real fetch is unchanged when it succeeds.
Screenshot Generator
From the project root, run:
# Generate screenshots for a specific locale
pytest tests/screenshot_generator/generator.py --locale es
# Generate screenshots for all supported locales
pytest tests/screenshot_generator/generator.py
You can also run a coverage report to see exactly what the screenshots are and are not hitting:
coverage erase
coverage run -m pytest tests/screenshot_generator/generator.py --locale es && coverage combine && coverage report
# Generate the interactive html report
coverage html
Writes the screenshots to a dir in the project root: seedsigner-screenshots.