Description
The agentjson PyPI package (version 0.1.2) has a packaging bug where the json_prob_parser module is not included in the wheel distribution.
Expected Behavior
The high-level API should work:
from agentjson import parse
result = parse('{"key": "value",}') # trailing comma
Actual Behavior
Import fails with ModuleNotFoundError:
>>> from agentjson import parse
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File ".../agentjson/__init__.py", line 1, in <module>
from .json_prob_parser import parse
ModuleNotFoundError: No module named 'agentjson.json_prob_parser'
Workaround
The low-level Rust API still works:
from agentjson.agentjson_rust import parse_py
result = parse_py('{"key": "value",}')
Environment
- Package version: 0.1.2
- Installation:
pip install agentjson
- Python: 3.11
- Platform: macOS (arm64)
Likely Cause
The json_prob_parser.py file (or compiled equivalent) appears to be missing from the wheel distribution. This may be a pyproject.toml or MANIFEST.in issue where the Python wrapper module is not being included in the built package.
Suggested Fix
Check the packaging configuration to ensure json_prob_parser is included in the wheel. This might require updating the [tool.maturin] or [tool.setuptools] section of pyproject.toml.
Description
The agentjson PyPI package (version 0.1.2) has a packaging bug where the
json_prob_parsermodule is not included in the wheel distribution.Expected Behavior
The high-level API should work:
Actual Behavior
Import fails with
ModuleNotFoundError:Workaround
The low-level Rust API still works:
Environment
pip install agentjsonLikely Cause
The
json_prob_parser.pyfile (or compiled equivalent) appears to be missing from the wheel distribution. This may be apyproject.tomlorMANIFEST.inissue where the Python wrapper module is not being included in the built package.Suggested Fix
Check the packaging configuration to ensure
json_prob_parseris included in the wheel. This might require updating the[tool.maturin]or[tool.setuptools]section ofpyproject.toml.