unum-cloud / usearch

Fast Open-Source Search & Clustering engine × for Vectors & 🔜 Strings × in C++, C, Python, JavaScript, Rust, Java, Objective-C, Swift, C#, GoLang, and Wolfram 🔍
https://unum-cloud.github.io/usearch/
Apache License 2.0
2.27k stars 143 forks source link

Bug: module 'usearch' has no attribute 'sqlite_path' #376

Closed raydelvecchio closed 7 months ago

raydelvecchio commented 7 months ago

Describe the bug

Here's my code, directly from the USearch SQLite docs (https://github.com/unum-cloud/usearch/tree/main/sqlite):

`import usearch

import sqlite3

conn = sqlite3.connect("test.db")

conn.enable_load_extension(True)

conn.load_extension(usearch.sqlite_path())`

Running this code, when line 5 is reached, I receive an error stating AttributeError: module 'usearch' has no attribute 'sqlite_path'.

I'm currently on usearch python version 2.8.15 (via pip3 list).

Steps to reproduce

  1. Install usearch via pip3 install usearch (latest version, and the one I'm on, is 2.8.15) in a virtual environment.
  2. Run the above code, and see the error.

Expected behavior

The script should run without error and I should be able to operate with vectors within SQLite, as shown here: https://github.com/unum-cloud/usearch/tree/main/sqlite. Perhaps the documentation is outdated or incorrect?

USearch version

2.8.15

Operating System

MacOS

Hardware architecture

Arm

Which interface are you using?

Python bindings

Contact Details

ray@cerebralvalley.ai

Is there an existing issue for this?

Code of Conduct

ashvardanian commented 7 months ago

Hi @raydelvecchio! The docs are for the recent version 2.10+. Can you please refresh your installation?

simonw commented 7 months ago

I think usearch.sqlite_path() may have been renamed to usearch.sqlite - try that.

Actually no I think I'm wrong about that, here's the current code: https://github.com/unum-cloud/usearch/blob/3fd51841664471fad12ef5c37f0d87e783a7c7a1/python/usearch/__init__.py#L124-L129

ashvardanian commented 7 months ago

@raydelvecchio, can you please check the 2.10.3? It should work fine.