Skip to content

[Bug]: AttributeError: 'str' object has no attribute 'value' in agent_memory.py #196

@lizzy-0323

Description

@lizzy-0323

Describe the bug

📝 Adding memories...
Error determining scope: Expecting value: line 1 column 1 (char 0)
Failed to persist memory to storage: 'str' object has no attribute 'value'
Failed to process memory for agent support_agent: 'str' object has no attribute 'value'
Failed to add memory: 'str' object has no attribute 'value'
❌ Error during demo: 'str' object has no attribute 'value'
Traceback (most recent call last):
File "/home/adrian/code/powermem/examples/agent_memory.py", line 626, in main
demonstrate_auto_mode()
File "/home/adrian/code/powermem/examples/agent_memory.py", line 66, in demonstrate_auto_mode
agent_memory.add(
File "/home/adrian/code/powermem/examples/../src/powermem/agent/agent.py", line 376, in add
result = self._agent_manager.process_memory(
File "/home/adrian/code/powermem/examples/../src/powermem/agent/implementations/multi_agent.py", line 233, in process_memory
memory_id = self._persist_memory_to_storage(temp_memory_data)
File "/home/adrian/code/powermem/examples/../src/powermem/agent/implementations/multi_agent.py", line 346, in _persist_memory_to_storage
'scope': memory_data.get('scope').value if memory_data.get('scope') else None,
AttributeError: 'str' object has no attribute 'value'

Environment

Arch: Darwin arm64
LLM: Qwen
Embedding: Qwen text-embedding-v4
Database: Sqlite

Fast reproduce steps

cd examples && python agent_memory.py

Expected behavior

No response

Actual behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions