feat: add cli event handler #627
GitHub Actions / JUnit Test Report
failed
Dec 19, 2024 in 0s
237 tests run, 227 passed, 9 skipped, 1 failed.
Annotations
Check failure on line 173 in packages/ragbits-core/tests/cli/test_vector_store.py
github-actions / JUnit Test Report
test_vector_store.test_vector_store_list_json
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Raw output
def test_vector_store_list_json():
autoregister()
runner = CliRunner(mix_stderr=False)
result = runner.invoke(
root_app,
[
"--output",
"json",
"vector-store",
"--factory-path",
"cli.test_vector_store:vector_store_factory",
"list",
],
)
print(result.stderr)
assert result.exit_code == 0
> dicts = json.loads(result.stdout)
packages/ragbits-core/tests/cli/test_vector_store.py:173:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/json/__init__.py:346: in loads
return _default_decoder.decode(s)
/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/json/decoder.py:337: in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <json.decoder.JSONDecoder object at 0x7f4d84694850>
s = 'Verbose mode is disabled.\n[\n {\n "id": "1",\n "key": "entry 1",\n "vector": [\n ... 8.0\n ],\n "metadata": {\n "foo": "bar",\n "baz": "qux"\n }\n }\n]\n'
idx = 0
def raw_decode(self, s, idx=0):
"""Decode a JSON document from ``s`` (a ``str`` beginning with
a JSON document) and return a 2-tuple of the Python
representation and the index in ``s`` where the document ended.
This can be used to decode a JSON document from a string that may
have extraneous data at the end.
"""
try:
obj, end = self.scan_once(s, idx)
except StopIteration as err:
> raise JSONDecodeError("Expecting value", s, err.value) from None
E json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/json/decoder.py:355: JSONDecodeError
Loading