Skip to content

FAQ and Troubleshooting

Hoda Rezvanjoo edited this page May 28, 2026 · 1 revision

Crashes and error messages

AttributeError: 'Module5MonteCarloResult' object has no attribute 'stability_score'

You're running stale code. The fix is in main. On Streamlit Cloud: Manage app → Reboot app, then hard-refresh.

Module5ValidationError: LP infeasible

Your floors are mutually impossible. Common causes:

  • Sum of per-platform minimums > total budget
  • Sum of per-goal minimums > total budget (after test-and-learn carve-out)
  • A goal floor on an objective no active platform serves

Open Step 4, lower a floor, re-solve.

FlowStateError: Module X not finalised

You skipped a wizard step or WizardState got corrupted. Click Reset at the top, walk the wizard again.

All N Monte Carlo trials failed

Either productivities are all zero (check Module 4 didn't skip every row), or per-cell CVs are extreme (check kpi_observations for outliers).

Surprising allocations

"Why does Facebook get 90% of the budget?"

Open the diagnostics panel:

  1. Productivity column — is Facebook genuinely an order of magnitude better, or is its history thin and getting too much weight? If thin, set a meaningful historical_days value.
  2. Binding constraints — if your only floor binds, the LP has freedom to corner.
  3. Plan B — set plan_b_top_platform_cap to 0.6 and look at the diversified alternative.
  4. Monte Carlo — if stability_score < 70%, the ranking isn't trustworthy. Diversify by policy, not by hoping the LP does it.

"Why is the conservative scenario bigger than the base?"

Almost always a swapped scenario_multipliers. Check Step 4 — conservative should multiply by ~0.83, not ~1.2.

"Why are my forecast bands enormous?"

You have very little history (historical_days < 14) or supplied kpi_observations with high noise. Check the audit panel on Step 3 — the band per KPI shows which path was taken (CV vs window-scaled vs default).

CSV imports

"The parser doesn't recognise my export."

Check encoding (re-save as UTF-8 if exported from Excel), delimiter (the parser tries ,;\t), and that the header row matches the platform's standard export. If columns have been renamed, the parser can't find them. Switch to manual entry if needed.

"Engagement comes out way too high."

Likely a fallback to the platform's bundled metric (which double-counts components). Look for the warning in the parsing detail panel. Either add broken-out columns to your export or use the custom-composition override.

Performance

"Monte Carlo takes forever."

Each trial is one LP solve (~50ms on a typical plan). 200 trials ≈ 10 s; 1,000 ≈ 50 s. Single process, single solver — no parallel runner yet. Don't push past 500 unless you're willing to wait.

"Streamlit hangs on solve."

Usually the LP solves fine but the UI is rendering many charts. Reduce active platforms or collapse the diagnostics expanders.

How to file a useful bug report

  1. Reset the wizard.
  2. Reproduce with minimal inputs (1 objective, 2 platforms).
  3. Copy the full traceback from "Manage app" logs.
  4. Open an issue with the traceback, the inputs, expected vs actual behaviour, and a link to the deployed run if possible.

Clone this wiki locally