Spaces:
Sleeping
Sleeping
Download scripts/require_libsumo.py from REBELLION2002/traffix-live: direct link, hf CLI and curl.
- Browser
- Download file 681 Bytes
-
https://huggingface.co/spaces/REBELLION2002/traffix-live/resolve/main/scripts/require_libsumo.py
- Command line
-
hf download hf://spaces/REBELLION2002/traffix-live/scripts/require_libsumo.py
-
curl -L -o require_libsumo.py https://huggingface.co/spaces/REBELLION2002/traffix-live/resolve/main/scripts/require_libsumo.py
681 Bytes
| """Fail honestly when this runner cannot import libsumo (ADR-0003).""" | |
| from __future__ import annotations | |
| def main() -> int: | |
| try: | |
| import libsumo | |
| except Exception as exc: # noqa: BLE001 — any import failure is Exit 3 | |
| print( | |
| "eval.yml Exit 3: this runner cannot import libsumo. " | |
| "Use a self-hosted Windows runner with pinned SUMO 1.27.1 " | |
| "and an allowed libsumo. Do not treat a missing SUMO as a pass. " | |
| f"Cause: {type(exc).__name__}: {exc}" | |
| ) | |
| return 1 | |
| print("libsumo", libsumo.__file__) | |
| return 0 | |
| if __name__ == "__main__": | |
| raise SystemExit(main()) | |