Skip to content

[Bug]: Segmentation Fault or AssertionError during initialization on Python 3.14.2 #618

@ElissonRodrigues

Description

@ElissonRodrigues

What happened?

When running on Python 3.14.2 (Linux), initializing SparseTextEmbedding causes a Segmentation Fault (Exit Code 139). Additionally, when used via qdrant-client, it triggers an AssertionError in the is_installed check because the model listing mechanism seems to return unexpected results or fails to find models in certain environments.

What is the expected behaviour?

The library should initialize correctly and be able to list/load models on Python 3.14, or at least fail gracefully with a clear error message instead of a Segmentation Fault.

A minimal reproducible example

import logging
from fastembed import SparseTextEmbedding

logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

def reproduce():
    try:
        logger.info("Initializing SparseTextEmbedding...")
        # This causes SIGSEGV (Exit Code 139) on Python 3.14.2
        model = SparseTextEmbedding(model_name="Qdrant/bm25")
        logger.info("Success!")
    except Exception as e:
        logger.error(f"Caught: {e}")

if __name__ == "__main__":
    reproduce()

What Python version are you on? e.g. python --version

Python 3.14.2 (Linux), using uv as package manager.

FastEmbed version

v0.8.0

What os are you seeing the problem on?

Linux

Relevant stack traces and/or logs

Traceback (most recent call last):
  File "test.py", line 22, in <module>
    db_instance = SharedLibraryDB().db
  File "qdrant_client/qdrant_fastembed.py", line 38, in __init__
    self.__class__._FASTEMBED_INSTALLED = FastEmbedMisc.is_installed()
  File "qdrant_client/fastembed_common.py", line 62, in is_installed
    assert len(LateInteractionMultimodalEmbedding.list_supported_models()) > 0
AssertionError

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions