Bug Description
When running basic-memory mcp (version 0.14.2) on macOS with Python 3.12.11, I receive the following error:
ValueError: Level 'debug' does not exist
This error occurs in basic_memory/utils.py during loguru setup, specifically at the call:
logger.add(..., level="debug", ...)
Steps To Reproduce
Steps to reproduce the behavior:
- Install
basic-memory version 0.14.2 via pip or pipx with Python 3.12.11
- Run:
basic-memory mcp
- The CLI configures
loguru logging
- Execution fails with a
ValueError stating "Level 'debug' does not exist"
Expected Behavior
basic-memory mcp should start the MCP server successfully without raising an exception. The logging configuration should accept a standard log level "DEBUG".
Actual Behavior
Instead of launching, execution fails with the traceback:
ValueError: Level 'debug' does not exist
This happens because loguru does not recognize "debug" (lowercase) as a valid log level name. Its API (logger.add(..., level="...")) expects uppercase strings like "DEBUG" ([GitHub][1], [GitHub][2], [Loguru][3]).
Environment
- OS: macOS (Apple Silicon)
- Python version: 3.12.11 (via Homebrew)
- Basic‑memory version: 0.14.2
- Installation method: installed via
pipx --python /opt/homebrew/bin/python3.12
- Claude Desktop version (if applicable): N/A
Additional Context
- No existing issue was found regarding this error in the official repository.
loguru requires log level names in uppercase (e.g. "DEBUG"); lowercase "debug" is invalid and triggers ValueError ([Loguru][3]).
- The issue appears on Python ≥ 3.12, showing incompatibility with lowercase default log level.
Possible Solution
As a workaround, edit basic_memory/utils.py and change:
logger.add(..., level="debug", ...)
to:
logger.add(..., level="DEBUG", ...)
For a long‑term fix, the codebase should normalize log level inputs or default to uppercase. Introducing automated tests for Python 3.12+ would also help prevent this in future releases.
Bug Description
When running
basic-memory mcp(version 0.14.2) on macOS with Python 3.12.11, I receive the following error:This error occurs in
basic_memory/utils.pyduringlogurusetup, specifically at the call:Steps To Reproduce
Steps to reproduce the behavior:
basic-memoryversion 0.14.2 via pip or pipx with Python 3.12.11basic-memory mcploguruloggingValueErrorstating"Level 'debug' does not exist"Expected Behavior
basic-memory mcpshould start the MCP server successfully without raising an exception. The logging configuration should accept a standard log level"DEBUG".Actual Behavior
Instead of launching, execution fails with the traceback:
This happens because
logurudoes not recognize"debug"(lowercase) as a valid log level name. Its API (logger.add(..., level="...")) expects uppercase strings like"DEBUG"([GitHub][1], [GitHub][2], [Loguru][3]).Environment
pipx --python /opt/homebrew/bin/python3.12Additional Context
logururequires log level names in uppercase (e.g."DEBUG"); lowercase"debug"is invalid and triggersValueError([Loguru][3]).Possible Solution
As a workaround, edit
basic_memory/utils.pyand change:to:
For a long‑term fix, the codebase should normalize log level inputs or default to uppercase. Introducing automated tests for Python 3.12+ would also help prevent this in future releases.