-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Calling BaseModel.model_dump_json() with the separators argument causes a TypeError. This breaks JSON output when the CLI attempts to write analysis results.
To Reproduce
Steps to reproduce the behavior:
- Run the CLI with
--format=json - Let the output path point to a real directory
- Observe the crash from
_write_output()when writingmodel_dump_json(separators=(",", ":"))
Expected behavior
The CLI should serialize and write a compact JSON representation of the analysis artifacts without throwing an error.
Logs
Traceback:
File "__main__.py", line 88, in main
_write_output(artifacts, output, format)
File "__main__.py", line 96, in _write_output
f.write(artifacts.model_dump_json(separators=(",", ":")))
TypeError: BaseModel.model_dump_json() got an unexpected keyword argument 'separators'
Additional context
This error was introduced in the following PR:
Add output format flag with MessagePack compression support
Address issue #6 by implementing a --format flag that allows users to choose between compact JSON and ultra-compressed MessagePack output formats, achieving 80-90% size reduction for large analysis results.
Fix
Remove the separators argument from the model_dump_json() call:
f.write(artifacts.model_dump_json())Pydantic does not support separators in model_dump_json(). For compact formatting, consider post-processing or using json.dumps(model_dump(), separators=...) instead if needed in the future.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working