memU icon indicating copy to clipboard operation
memU copied to clipboard

Self-hosted Docker Fails to Run Properly with Python SDK in retrieve_related_memory_items

Open soulgod001 opened this issue 2 months ago • 0 comments

I'm encountering issues when using the Python SDK with a self-hosted Docker deployment (minimal mode). The problem occurs specifically during memory operations.

Environment:

Deployment Mode: Minimal Code Version: b01b3ba1bee164a81c38dac47743b39f474cc47f Issues Details:

Error in memorize -> cluster_memories: When creating a memory task via memorize, the process fails during the cluster_memories method iteration with the error: Failed to parse function arguments niter: line 1 column 2382 (char 2381)

Inconsistent Behavior: Direct API call vs. Python SDK:

Direct API call via curl: The request succeeds (HTTP 200), and the server returns a normal response. However, the created_at and updated_at fields in the response are null, while happened_at contains a valid value. Python SDK call: The server also returns HTTP 200, but the Python SDK throws a Pydantic validation error before returning the result to my code. The error indicates that the related_memories list contains items where the memory.created_at field (and likely updated_at) is None, which does not comply with the expected datetime type in the RelatedMemoryItemsResponse model. The specific validation errors are:

Request validation failed for RelatedMemoryItemsResponse: 4 validation errors: related_memories.0.memory.created_at Input should be a valid datetime [type=datetime_type, input_value=None, input_type=NoneType] ... (similar errors for other indices and likely for updated_at) Summary: The core issue seems to be a data format mismatch. The server's API is returning null for certain datetime fields (created_at, updated_at), which the Python SDK's Pydantic models strictly require to be valid datetime objects. This causes the SDK to fail when processing an otherwise successful (200) response from the server.

soulgod001 avatar Oct 16 '25 11:10 soulgod001