Skip to content

Return not_found_error when send message #104

@thanhthanhha

Description

@thanhthanhha

response = claude_api.send_message(prompt, conversation_id)
Traceback (most recent call last):
File "", line 1, in
File "D:\Git\claude-api\backend\env\lib\site-packages\claude_api.py", line 135, in send_message
data = json.loads(json_str)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\json_init_.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.10_3.10.3056.0_x64__qbz5n2kfra8p0\lib\json\decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 1 column 4 (char 3)

I print the full response and get this
JSON string: ":"error","error":{"type":"not_found_error","message":"Not Found"}}

JSON string: ['{"type":"error","error":{"type":"not_found_error","message":"Not Found"}}']

JSON string: ":"error","error":{"type":"not_found_error","message":"Not Found"}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions