docs: TimeCurve bot install — 'ModuleNotFoundError: web3' on fresh QA server without venv #50
Labels
No labels
agent:fix_bugfix
agent:fix_conflicts
agent:fix_security
agent:gap_analysis
agent:implement
agent:open_issues
agents
agent:security_audit
agent:verify
area
timecurve
arena
arena-v2
audit
block:feature_review
block:security
bug
contracts
design
devops
docs
documentation
enhancement
epic
feature
frontend
indexer
low priority
megaeth
operations
ops
performance
QA
qa checklist
referrals
removal
security
smart-contracts
tech-debt
testing
time-arena
timecurve
visual-qa
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
code/yieldomega#50
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Filed per dev request from #39 section A install gotcha.
Summary
First run of
scripts/start-local-anvil-stack.shon a fresh QA server (no venv) fails withModuleNotFoundError: web3fromswarm_runner.py. The documentedpip install -e .recommendation inbots/timecurveis insufficient on systems that enforce PEP 668 (externally-managed-environment).Observed
First stack run fails at swarm bootstrap:
Error originates from
bots/timecurve/src/swarm_runner.py(or equivalent entrypoint) attempting to import web3.Working fix
Then rerun
bash scripts/start-local-anvil-stack.sh.Why this happens
pip install -e .fails without--break-system-packagesor a venvpip install -e .which doesn't account for thisSuggested doc fixes
Either:
(a) Update
bots/timecurve/README.md(or wherever the install step is documented) to show both the venv path and the--user --break-system-packagesfallback for CI/QA servers, or(b) Add a preflight check to
start-local-anvil-stack.shthat attempts the pip install and surfaces a clearer error + copy-pasteable fix when it failsEnvironment
5.223.69.18(Ubuntu 24, no venv)fed6cd2..eac3d5frangecc @PlasticDigits
mentioned in issue #39
mentioned in commit
2b47d7d61bmentioned in commit
35a055ee68Fix shipped (main)
What changed
bots/timecurve/README.md: PEP 668 section — venv-first install pluspip install -e ".[dev]" --user --break-system-packagesfallback for bare QA hosts; linksSKILL.md.scripts/start-local-anvil-stack.sh:ensure_timecurve_bot_depspreflightsimport web3before the bot swarm and prints the same copy-paste commands if deps are missing.docs/testing/invariants-and-business-logic.md: Local stack bot swarm (tooling) row documents the invariant (swarm needs importableweb3; not onchain authority).docs/testing/e2e-anvil.md, QA checklists,.cursor/skills/yieldomega-guardrails/SKILL.md,bots/timecurve/SKILL.md.Merge:
35a055eonmain(includes merge offix/50-pep668-timecurve-bot).@Brouie please verify on a fresh PEP 668 host (or simulate missing
web3):Checklist
bots/timecurve/README.md→ PEP 668 — venv commands and fallback match your working fix.bots/timecurve/.venvand no user-siteweb3, runSKIP_ANVIL_RICH_STATE=1 bash scripts/start-local-anvil-stack.sh— expect clear error with both install options (not a rawModuleNotFoundError).cd bots/timecurve && python3 -m venv .venv && .venv/bin/pip install -e ".[dev]", re-run the stack — bot swarm should start (or proceed past the preflight).--user --break-system-packagesone-liner from the README still works andimport web3succeeds forpython3.bash -n scripts/start-local-anvil-stack.shpasses.Tests run (agent):
bash -n scripts/start-local-anvil-stack.sh;bots/timecurvepytest(13 passed) in a fresh venv.mentioned in issue #42
@PlasticDigits verified.
Both touch points present:
bots/timecurve/README.mdL17-27: dedicated 'PEP 668 (externally managed Python)' section. Explains symptom (ModuleNotFoundError: web3 when stack runs bot swarm) and gives the exactpip install -e ".[dev]" --user --break-system-packagesfallback command.scripts/start-local-anvil-stack.shL52:ensure_timecurve_bot_deps()helper runspython -c 'import web3'preflight, prints copy-paste venv and PEP 668 install commands if it fails, instructs to either install then re-run or setSTART_BOT_SWARM=0to skip the swarm. Called at L263 before swarm launch.Fail-fast pattern is the right call — users now see the install command upfront rather than deep in a Python traceback.
Closing as verified.
mentioned in issue #102
mentioned in issue #104