Skip to content

fix(backtests): resolve Windows venv interpreter path - #653

Open
subidhkhanal wants to merge 1 commit into
Open-Finance-Lab:mainfrom
subidhkhanal:fix/windows-venv-python-path
Open

subidhkhanal wants to merge 1 commit into
Open-Finance-Lab:mainfrom
subidhkhanal:fix/windows-venv-python-path

Conversation

@subidhkhanal

Copy link
Copy Markdown
Contributor

Problem

run_backtest_background launches the dashboard backtest as a subprocess and looked for its interpreter at <venv>/bin/python3, a POSIX-only path. On Windows that file never exists, so the subprocess failed instantly with WinError 2: The system cannot find the file specified, and every dashboard backtest died before loading any data.

Fix

Check <venv>/Scripts/python.exe on Windows (os.name == "nt") instead, matching the layout a Windows venv actually uses. Behavior on Mac/Linux is unchanged.

Testing

Ran a rule-based backtest (AAPL, MSFT) end-to-end through the local server on Windows; it now launches via .venv\Scripts\python.exe and completes.

Look for python.exe under Scripts\ on Windows instead of bin/python3.
Fixes dashboard backtests failing instantly with WinError 2.
@vercel

vercel Bot commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

@subidhkhanal is attempting to deploy a commit to the allan-feng's projects Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
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