Skip to content

[BUG] KeyError 'name' when importing memory.json file #232

@egoes

Description

@egoes

Summary

The basic-memory import memory-json command fails with a KeyError when attempting to import a memory.json file, indicating the import process expects a 'name' key that doesn't exist in the data structure.

Environment

  • Basic Memory version: 0.14.2
  • Installation method: Homebrew
  • Operating System: macOS
  • Python version: 3.13

Steps to Reproduce

  1. Attempt to import a memory.json file using the CLI command:
    basic-memory import memory-json path/to/memory.json

Expected Behavior

The memory.json file should be imported successfully without errors.

Actual Behavior

The import fails with the following error:

Importing from [PATH_REDACTED]/memory.json...writing to [PATH_REDACTED]
Failed to import memory.json
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/basic-memory/0.14.2/libexec/tools/basic-memory/lib/python3.13/site-packages/basic_memory/importers/memory_json_importer.py", line 44, in import_data
    entities[data["name"]] = data
             ~~~~^^^^^^^^
KeyError: 'name'
Error during import: 'NoneType' object has no attribute 'success'

Additional Context


This issue was written with assistance from Claude (Anthropic) to help structure the bug report and redact private information.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions