|
| 1 | +# Launcher crashes when `REME_PATH`/`REME_SCRIPT` are unset |
| 2 | + |
| 3 | +## Description |
| 4 | +Running `python launcher.py --conf examples/overall.yaml --with-appworld --with-reme` fails when ReMe-specific environment variables are not defined. `load_dotenv` only populates values that exist in a `.env` file, so in a fresh clone the required `REME_PATH` and `REME_SCRIPT` entries remain `None`. The launcher passes these values straight into `LaunchCommandWhenAbsent`, which attempts to hash them and crashes before ReMe is started. |
| 5 | + |
| 6 | +## Steps to Reproduce |
| 7 | +1. Clone `modelscope/AgentEvolver` (commit `2d7c14a2`). |
| 8 | +2. Ensure no `.env` file provides ReMe variables (default state). |
| 9 | +3. `conda activate agentevolver`. |
| 10 | +4. Run `python launcher.py --conf examples/overall.yaml --with-appworld --with-reme`. |
| 11 | + |
| 12 | +## Expected Result |
| 13 | +Launcher either starts ReMe or reports that the ReMe service configuration is missing in a user-friendly way. |
| 14 | + |
| 15 | +## Actual Result |
| 16 | +Launcher aborts with a `TypeError` while computing the companion process hash because `service_script` is `None`: |
| 17 | + |
| 18 | +``` |
| 19 | +Traceback (most recent call last): |
| 20 | + File "launcher.py", line 396, in <module> |
| 21 | + main() |
| 22 | + File "launcher.py", line 328, in main |
| 23 | + pty_launch("reme", success_std_string="Uvicorn running on") |
| 24 | + File "launcher.py", line 104, in pty_launch |
| 25 | + companion = LaunchCommandWhenAbsent( |
| 26 | + File "agentevolver/utils/daemon.py", line 276, in __init__ |
| 27 | + self.script_hash = hashlib.md5(''.join(hash_items).encode()).hexdigest()[:8] |
| 28 | +TypeError: sequence item 0: expected str instance, NoneType found |
| 29 | +``` |
| 30 | + |
| 31 | +## Environment |
| 32 | +- OS: Ubuntu 22.04.5 LTS |
| 33 | +- Python: `conda` env `agentevolver` |
| 34 | +- Commit: `2d7c14a2` |
| 35 | + |
| 36 | +## Suggested Fix |
| 37 | +Validate that `REME_PATH` and `REME_SCRIPT` are set before invoking `LaunchCommandWhenAbsent`, and emit a clear error (or provide defaults) instead of proceeding with `None` values. |
0 commit comments