In dataclaw/parser.py , log a warning whenever there is a JSONDecodeError or OSError.…
- User
In dataclaw/parser.py , log a warning whenever there is a JSONDecodeError or OSError. Also add appropriate warnings in other error handlings.
- User
Go on
Assistant
Now the last two — the
json.JSONDecodeErrorin_parse_kimi_session_file's tool call parsing, and theOSErrorat the end of that function.Assistant
Done. Here's a summary of all the warning additions across
parser.py:JSONDecodeError / OSError (explicit per your request):
_build_gemini_hash_map— OSError when scanning dirs_extract_project_path_from_sessions— split into separate JSONDecodeError / OSError handlers_iter_jsonl— JSONDecodeError on malformed lines (now includes filepath in message)_load_kimi_work_dirs— JSONDecodeError / OSError reading config_parse_gemini_session_file— split into separate JSONDecodeError / OSError handlers_extract_openclaw_cwd— split into separate JSONDecodeError / OSError handlers_parse_kimi_session_file— JSONDecodeError on tool args, OSError on file read
Other error handling (appropriate warnings added):
_discover_custom_projects— OSError counting lines
- User
It seems you made some mistakes when editing. Read
git diff HEADand fix them. Assistant
I can see several bugs. Let me fix them all:
_parse_claude_session_file—tool_result_map = _build_tool_result_map(...)line was dropped_parse_openclaw_session_file— duplicatereturn Noneand missingif not entries:check_parse_codex_session_file—state.tool_result_map = _build_codex_tool_result_map(...)line was dropped_extract_codex_cwd— function definition for_build_codex_project_namegot mangled into thereturn None_parse_kimi_session_file—return _make_session_result(...)was dropped and_build_opencode_project_indexdef got mangled
Assistant
Now I can see all the remaining issues clearly. Fixing them:
Assistant
Let me verify the diff is clean now:
Assistant
The diff looks clean. All five bugs are fixed:
_parse_claude_session_file—tool_result_map = _build_tool_result_map(...)restored_parse_openclaw_session_file— duplicatereturn Noneremoved,if not entries:check restored_parse_codex_session_file—state.tool_result_map = _build_codex_tool_result_map(...)restored_extract_codex_cwd—_build_codex_project_namefunction definition un-mangled_parse_kimi_session_file—return _make_session_result(...)restored and_build_opencode_project_indexdef un-mangled