Skip to content

fix: require Python 3.10+ in edict startup scripts#298

Merged
cft0808 merged 2 commits into
cft0808:mainfrom
njiangk:fix/python-3-10-startup-check
Apr 27, 2026
Merged

fix: require Python 3.10+ in edict startup scripts#298
cft0808 merged 2 commits into
cft0808:mainfrom
njiangk:fix/python-3-10-startup-check

Conversation

@njiangk
Copy link
Copy Markdown
Contributor

@njiangk njiangk commented Apr 21, 2026

Summary

  • make start.sh automatically select a Python 3.10+ interpreter
  • pass the selected interpreter through to scripts/run_loop.sh
  • update README to match the project's actual Python requirement

Problem

The repository README says Python 3.9+ is supported, and start.sh launches the dashboard with plain python3. On macOS systems where python3 is still 3.9, startup fails immediately because the codebase already uses Python 3.10+ syntax such as pathlib.Path | None.

Fix

This PR aligns the startup path and docs with the real runtime requirement:

  • start.sh now looks for EDICT_PYTHON, then python3.12, python3.11, python3.10, and finally python3, accepting the first interpreter that is 3.10+
  • the selected interpreter is exported and reused by scripts/run_loop.sh
  • README now states Python 3.10+

Reproduction

On a machine with python3 = 3.9.x, run:

chmod +x start.sh && ./start.sh

Startup fails during import with:

TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

Validation

  • verified startup succeeds with Python 3.11
  • verified dashboard serves successfully on http://127.0.0.1:7891/
  • verified the refresh loop uses the same interpreter selection path

@njiangk njiangk requested a review from cft0808 as a code owner April 21, 2026 06:03
@cft0808 cft0808 merged commit 7280fad into cft0808:main Apr 27, 2026
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.

2 participants