Possible errors and fixes
Common errors you may hit in the QuantCraft IDE and how to resolve them. This page will grow as more issues are documented. For package installs in general, see Dependencies.
Error index
- Package install: "a file it ships is in use"
- Package install: "pip metadata is missing" / "broken install"
- Backtest: "User script must define callable: …"
- Backtest: "No bars in the selected date range after warmup filter …"
- Backtest: "A screener symbol source needs an explicit start and end date …"
- Debug Test: "Debug test doesn't support a Screener symbol source …"
Package install: "a file it ships is in use"
What you'll see
Installing a package from IDE Packages fails with:
Package install failed (polars): Could not install 'polars' — a file it ships is in use
(a compiled extension like this is loaded by the editor's background workers, so pip
can't replace it). Quit QuantCraft to release the file, reopen it, and install again.
Pinning an exact version that is already installed avoids the overwrite.Underneath, pip hit [WinError 5] Access is denied on Windows (or [Errno 13] Permission denied on macOS / Linux) on a compiled extension — a .pyd, .so or .dll file such as _polars_runtime.pyd inside the IDE's Python environment.
Why it happens
Some packages (polars, numpy, pyarrow, and other native libraries) ship a compiled extension that gets loaded into memory when the package is imported. The IDE's background workers import your installed packages to power autocomplete and analysis, which loads that file. A file that is currently loaded cannot be overwritten, so when pip tries to replace it during an install or upgrade, the operating system blocks it.
This is why you may see it when installing the latest version (pip has to overwrite the loaded file) but not when pinning a version that is already installed (pip sees nothing to change and skips the file entirely).
How to fix it
- Quit QuantCraft completely — this ends the background Python workers that are holding the file open.
- Reopen QuantCraft.
- Install the package again, ideally before opening or running a script that imports it.
Tips:
- If the package is already installed and working, you often don't need to reinstall at all.
- Pinning an exact version that is already installed (e.g.
polars==1.41.2) avoids the overwrite and will succeed without a restart.
Package install: "pip metadata is missing" / "broken install"
What you'll see
Could not install 'somepkg' (pip metadata is missing). Try installing again to force a
clean copy, or quit QuantCraft, delete the ide-venv folder, and restart the app.or Could not install 'somepkg' (broken install).
Why it happens
A previous install or uninstall was interrupted and left the package half-installed, so pip can't find the record of which files it owns.
How to fix it
- Install the package again from IDE Packages — this usually forces a clean copy.
- If that still fails, quit QuantCraft, delete the
ide-venvfolder shown in the message, and restart. The app recreates the environment; reinstall your extra packages afterwards.
Backtest: "User script must define callable: …"
The strategy file is missing one of the required callbacks — on_init, on_bar, on_tick or on_finish — or it isn't a function. The Test button only checks for on_init / on_bar / on_finish, so a missing on_tick is the usual cause. Add this if you don't need it:
def on_tick(bar_index, tick_in_bar, price, bar, symbol=None):
passSee Strategy lifecycle.
Backtest: "No bars in the selected date range after warmup filter …"
Your start / end dates contain no candles for the clock symbol — for example a weekend-only range, dates before the symbol started trading, or a range beyond the data available. Widen the dates or check the symbol. A QuantCraft (B2) feed may instead say No AAPL bars (d) between … Available range is … to …, which tells you the valid range. See OHLCV and bar data.
Backtest: "A screener symbol source needs an explicit start and end date …"
A backtest whose Symbol source is Screener resolves its rebalance schedule from the date range before any bars load, so both dates are required. Set Start and End on the Simulation tab. See Screener.
Debug Test: "Debug test doesn't support a Screener symbol source …"
Debug Test runs a fixed list of symbols. Switch Symbol source to Selected symbols, pick one or two of the tickers your screen returns, and debug with those. See Debugging.
