What breaks
SupermemoryPipecatService._retrieve_memories() in packages/pipecat-sdk-python/src/supermemory_pipecat/service.py accesses response.profile.static and response.profile.dynamic without first checking whether response.profile is None. The Supermemory API returns None for the profile field when the user has no stored memories (e.g. a brand-new user). This causes an unhandled AttributeError that crashes the memory retrieval path and surfaces to callers as a MemoryRetrievalError wrapping the underlying exception.
Traceback
File "service.py", line 155, in _retrieve_memories
"static": response.profile.static,
^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'static'
How to trigger
Call _retrieve_memories() against a user account that has no stored memories. The API responds with profile=None, which the code does not guard against before attribute access.
What breaks
SupermemoryPipecatService._retrieve_memories()inpackages/pipecat-sdk-python/src/supermemory_pipecat/service.pyaccessesresponse.profile.staticandresponse.profile.dynamicwithout first checking whetherresponse.profileisNone. The Supermemory API returnsNonefor theprofilefield when the user has no stored memories (e.g. a brand-new user). This causes an unhandledAttributeErrorthat crashes the memory retrieval path and surfaces to callers as aMemoryRetrievalErrorwrapping the underlying exception.Traceback
How to trigger
Call
_retrieve_memories()against a user account that has no stored memories. The API responds withprofile=None, which the code does not guard against before attribute access.