Skip to content

Use Claude Code, Codex, VSCode, Pi, and OpenCode (and 6 other harnesses) for free (1.3B+ free tokens) from your terminal, app, IDE, or phone, and now from the browser with native browser sessions (multi-harness + multi-model) like OpenClaw (voice supported + ToS friendly)

Python

fix: correct except clause syntax in request_utils (TypeError, ValueError)

Cursor Agent575637bc947d
diff --git a/api/request_utils.py b/api/request_utils.py
index 4b3a04c3..6a0d1302 100644
--- a/api/request_utils.py
+++ b/api/request_utils.py
@@ -87,7 +87,7 @@ def get_token_count(
else:
try:
total_tokens += len(ENCODER.encode(json.dumps(block)))
- except TypeError, ValueError:
+ except (TypeError, ValueError):
total_tokens += len(ENCODER.encode(str(block)))
if tools: