graphiti icon indicating copy to clipboard operation
graphiti copied to clipboard

[BUG]mistral-embed model neo4j.exceptions.CypherTypeError: {code: Neo.ClientError.Statement.TypeError} {message: Property values can only be of primitive types or arrays thereof. Encountered: Map{summary

Open hypntzed78 opened this issue 6 months ago • 4 comments

Bug Description

A clear and concise description of what the bug is. E:\Project\graphiti_project.venv\Scripts\python.exe E:\Project\graphiti_project\src\backend\load_data.py neo4j.exceptions.GqlError: {gql_status: 22N01} {gql_status_description: error: data exception - invalid type. Expected the value Map{summary -> Map{description -> String("TinyBirds Wool Runners are eco-friendly and machine washable sneakers designed for kids. They are made with comfortable, itch-free ZQ Merino Wool, ensuring they are super soft and cozy. These sneakers are available in various sizes for little kids, including 5T, 6T, 7T, 8T, 9T, and 10T. The product is currently not available, with a price of $25.00 and a compare-at price of $60.00. The shoes are part of the Manybirds brand and are categorized under the product type 'Shoes'. Key features include being eco-friendly, machine washable, and made from wool. The product is also tagged with various attributes such as carbon score, material, and silhouette."), title -> String("Summary"), type -> String("string")}} to be of type BOOLEAN, STRING, INTEGER, FLOAT, DATE, LOCAL TIME, ZONED TIME, LOCAL DATETIME, ZONED DATETIME, DURATION or POINT, but was of type MAP NOT NULL.} {message: 22N01: Expected the value Map{summary -> Map{description -> String("TinyBirds Wool Runners are eco-friendly and machine washable sneakers designed for kids. They are made with comfortable, itch-free ZQ Merino Wool, ensuring they are super soft and cozy. These sneakers are available in various sizes for little kids, including 5T, 6T, 7T, 8T, 9T, and 10T. The product is currently not available, with a price of $25.00 and a compare-at price of $60.00. The shoes are part of the Manybirds brand and are categorized under the product type 'Shoes'. Key features include being eco-friendly, machine washable, and made from wool. The product is also tagged with various attributes such as carbon score, material, and silhouette."), title -> String("Summary"), type -> String("string")}} to be of type BOOLEAN, STRING, INTEGER, FLOAT, DATE, LOCAL TIME, ZONED TIME, LOCAL DATETIME, ZONED DATETIME, DURATION or POINT, but was of type MAP NOT NULL.} {diagnostic_record: {'_classification': 'CLIENT_ERROR', 'OPERATION': '', 'OPERATION_CODE': '0', 'CURRENT_SCHEMA': '/'}} {raw_classification: CLIENT_ERROR}

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "E:\Project\graphiti_project\src\backend\load_data.py", line 77, in asyncio.run(ingest_products_data(client)) ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Python313\Lib\asyncio\runners.py", line 194, in run return runner.run(main) ~~~~~~~~~~^^^^^^ File "C:\Python313\Lib\asyncio\runners.py", line 118, in run return self._loop.run_until_complete(task) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^ File "C:\Python313\Lib\asyncio\base_events.py", line 720, in run_until_complete return future.result() ~~~~~~~~~~~~~^^ File "E:\Project\graphiti_project\src\backend\load_data.py", line 68, in ingest_products_data await client.add_episode( ...<5 lines>... ) File "E:\Project\graphiti_project.venv\Lib\site-packages\graphiti_core\graphiti.py", line 537, in add_episode raise e File "E:\Project\graphiti_project.venv\Lib\site-packages\graphiti_core\graphiti.py", line 518, in add_episode await add_nodes_and_edges_bulk( self.driver, [episode], episodic_edges, hydrated_nodes, entity_edges, self.embedder ) File "E:\Project\graphiti_project.venv\Lib\site-packages\graphiti_core\utils\bulk_utils.py", line 105, in add_nodes_and_edges_bulk await session.execute_write( ...<7 lines>... ) File "E:\Project\graphiti_project.venv\Lib\site-packages\neo4j_async\work\session.py", line 803, in execute_write return await self._run_transaction( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ...<5 lines>... ) ^ File "E:\Project\graphiti_project.venv\Lib\site-packages\neo4j_async\work\session.py", line 583, in _run_transaction result = await transaction_function(tx, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Project\graphiti_project.venv\Lib\site-packages\graphiti_core\utils\bulk_utils.py", line 172, in add_nodes_and_edges_bulk_tx await tx.run( EPISODIC_EDGE_SAVE_BULK, episodic_edges=[edge.model_dump() for edge in episodic_edges] ) File "E:\Project\graphiti_project.venv\Lib\site-packages\neo4j_async\work\transaction.py", line 206, in run await result._tx_ready_run(query, parameters) File "E:\Project\graphiti_project.venv\Lib\site-packages\neo4j_async\work\result.py", line 177, in _tx_ready_run await self._run(query, parameters, None, None, None, None, None, None) File "E:\Project\graphiti_project.venv\Lib\site-packages\neo4j_async\work\result.py", line 236, in _run await self._attach() File "E:\Project\graphiti_project.venv\Lib\site-packages\neo4j_async\work\result.py", line 430, in _attach await self._connection.fetch_message() File "E:\Project\graphiti_project.venv\Lib\site-packages\neo4j_async\io_common.py", line 195, in inner await coroutine_func(*args, **kwargs) File "E:\Project\graphiti_project.venv\Lib\site-packages\neo4j_async\io_bolt.py", line 864, in fetch_message res = await self._process_message(tag, fields) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\Project\graphiti_project.venv\Lib\site-packages\neo4j_async\io_bolt5.py", line 1208, in _process_message await response.on_failure(summary_metadata or {}) File "E:\Project\graphiti_project.venv\Lib\site-packages\neo4j_async\io_common.py", line 254, in on_failure raise self._hydrate_error(metadata) neo4j.exceptions.CypherTypeError: {code: Neo.ClientError.Statement.TypeError} {message: Property values can only be of primitive types or arrays thereof. Encountered: Map{summary -> Map{description -> String("TinyBirds Wool Runners are eco-friendly and machine washable sneakers designed for kids. They are made with comfortable, itch-free ZQ Merino Wool, ensuring they are super soft and cozy. These sneakers are available in various sizes for little kids, including 5T, 6T, 7T, 8T, 9T, and 10T. The product is currently not available, with a price of $25.00 and a compare-at price of $60.00. The shoes are part of the Manybirds brand and are categorized under the product type 'Shoes'. Key features include being eco-friendly, machine washable, and made from wool. The product is also tagged with various attributes such as carbon score, material, and silhouette."), title -> String("Summary"), type -> String("string")}}.}

Process finished with exit code 1

Steps to Reproduce

I run this code in using mistral-embed model (gemini embed workfine) https://github.com/getzep/graphiti/blob/main/examples/langgraph-agent/agent.ipynb Provide a minimal code example that reproduces the issue:


async def ingest_products_data(client: Graphiti):
    script_dir = Path.cwd().parent
    json_file_path = script_dir / 'data' / 'manybirds_products.json'

    with open(json_file_path) as file:
        products = json.load(file)['products']

    for i, product in enumerate(products):
        await client.add_episode(
            name=product.get('title', f'Product {i}'),
            episode_body=str({k: v for k, v in product.items() if k != 'images'}),
            source_description='ManyBirds products',
            source=EpisodeType.json,
            reference_time=datetime.now(timezone.utc),
        )


await ingest_products_data(client)

Expected Behavior

A clear and concise description of what you expected to happen.

Actual Behavior

A clear and concise description of what actually happened.

Environment

  • Graphiti Version: [e.g. 0.15.1]
  • Python Version: [e.g. 3.11.5]
  • Operating System: [e.g. macOS 14.0, Ubuntu 22.04]
  • Database Backend: [e.g. Neo4j 5.26, FalkorDB 1.1.2]
  • LLM Provider & Model: [e.g. OpenAI gpt-4.1, Anthropic claude-4-sonnet, Google gemini-2.5-flash]

Installation Method

  • [ ] pip install
  • [ ] uv add
  • [ ] Development installation (git clone)

Error Messages/Traceback

Paste the full error message and traceback here

Configuration

# Relevant configuration or initialization code

Additional Context

  • Does this happen consistently or intermittently?
  • Which component are you using? (core library, REST server, MCP server)
  • Any recent changes to your environment?
  • Related issues or similar problems you've encountered?

Possible Solution

If you have ideas about what might be causing the issue or how to fix it, please share them here.

hypntzed78 avatar Jul 11 '25 08:07 hypntzed78

Which LLM provider and model are you using? It's likely your LLM is not outputting the correct schema required by Graphiti. See the warnings here: https://help.getzep.com/graphiti/configuration/llm-configuration

danielchalef avatar Jul 11 '25 14:07 danielchalef

@hypntzed78 Is this still an issue? Please confirm within 14 days or this issue will be closed.

claude[bot] avatar Oct 05 '25 00:10 claude[bot]

Hello, is this question had been solved?I meet the same problem.

gs-max avatar Oct 19 '25 08:10 gs-max

@hypntzed78 Is this still an issue? Please confirm within 14 days or this issue will be closed.

claude[bot] avatar Nov 17 '25 00:11 claude[bot]