JSON parse error #37

Open
opened 2025-09-23 13:31:34 -06:00 by rs-pencil · 0 comments
rs-pencil commented 2025-09-23 13:31:34 -06:00 (Migrated from spacecruft.org)
--- Calling OpenAI API with streaming (attempt 1/3) ---
2025-09-23 19:30:15,075 - httpx - INFO - HTTP Request: POST https://api.deepinfra.com/v1/chat/completions "HTTP/1.1 200 OK"


--- API streaming successful ---
ERROR: Tool call parsing/execution failed: ValueError: Invalid tool call JSON: Empty strings are not legal JSON5
Traceback (most recent call last):
  File "/home/jebba/devel/deepcrayon/braincloud/src/braincloud/deepresearch/agent.py", line 626, in _run
    tool_call = json5.loads(tool_call_str)
  File "/home/jebba/devel/deepcrayon/braincloud/.venv/lib/python3.13/site-packages/json5/lib.py", line 190, in loads
    val, err, _ = parse(
                  ~~~~~^
        s=s,
        ^^^^
    ...<10 lines>...
        start=start,
        ^^^^^^^^^^^^
    )
    ^
  File "/home/jebba/devel/deepcrayon/braincloud/.venv/lib/python3.13/site-packages/json5/lib.py", line 291, in parse
    raise ValueError('Empty strings are not legal JSON5')
ValueError: Empty strings are not legal JSON5

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jebba/devel/deepcrayon/braincloud/src/braincloud/deepresearch/agent.py", line 631, in _run
    raise ValueError(f"Invalid tool call JSON: {str(e)}")
ValueError: Invalid tool call JSON: Empty strings are not legal JSON5

``` --- Calling OpenAI API with streaming (attempt 1/3) --- 2025-09-23 19:30:15,075 - httpx - INFO - HTTP Request: POST https://api.deepinfra.com/v1/chat/completions "HTTP/1.1 200 OK" --- API streaming successful --- ERROR: Tool call parsing/execution failed: ValueError: Invalid tool call JSON: Empty strings are not legal JSON5 Traceback (most recent call last): File "/home/jebba/devel/deepcrayon/braincloud/src/braincloud/deepresearch/agent.py", line 626, in _run tool_call = json5.loads(tool_call_str) File "/home/jebba/devel/deepcrayon/braincloud/.venv/lib/python3.13/site-packages/json5/lib.py", line 190, in loads val, err, _ = parse( ~~~~~^ s=s, ^^^^ ...<10 lines>... start=start, ^^^^^^^^^^^^ ) ^ File "/home/jebba/devel/deepcrayon/braincloud/.venv/lib/python3.13/site-packages/json5/lib.py", line 291, in parse raise ValueError('Empty strings are not legal JSON5') ValueError: Empty strings are not legal JSON5 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/jebba/devel/deepcrayon/braincloud/src/braincloud/deepresearch/agent.py", line 631, in _run raise ValueError(f"Invalid tool call JSON: {str(e)}") ValueError: Invalid tool call JSON: Empty strings are not legal JSON5 ```
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepcrayon/braincloud#37
No description provided.